X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Fscreen.c;h=8fdbe096f6b577c6035d116b27411a24622e6ab5;hb=fde5ca09e9ea7ab08b6dc06723f19bad6d03af22;hp=71748d65277701dc383711c89733aeb683b66f42;hpb=ad852b6b56e43bdd7dda1389f54051cf92c0fad9;p=chaz%2Fopenbox diff --git a/openbox/screen.c b/openbox/screen.c index 71748d65..8fdbe096 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -58,6 +58,7 @@ gboolean screen_showing_desktop; DesktopLayout screen_desktop_layout; gchar **screen_desktop_names; Window screen_support_win; +Time screen_desktop_user_time = CurrentTime; static Rect **area; /* array of desktop holding array of xinerama areas */ static Rect *monitor_area; @@ -138,16 +139,15 @@ static gboolean replace_wm() } if (wait >= timeout) { - g_message(_("Timeout expired while waiting for the current WM to die" - " on screen %d"), ob_screen); + g_message(_("The WM on screen %d is not exiting"), ob_screen); return FALSE; } } /* Send client message indicating that we are now the WM */ prop_message(RootWindow(ob_display, ob_screen), prop_atoms.manager, - timestamp, wm_sn_atom, 0, 0, SubstructureNotifyMask); - + timestamp, wm_sn_atom, screen_support_win, 0, + SubstructureNotifyMask); return TRUE; } @@ -475,6 +475,9 @@ void screen_set_desktop(guint num) } event_ignore_queued_enters(); + + if (event_curtime != CurrentTime) + screen_desktop_user_time = event_curtime; } static void get_row_col(guint d, guint *r, guint *c) @@ -595,11 +598,8 @@ void screen_desktop_popup(guint d, gboolean show) a = screen_physical_area_monitor(0); pager_popup_position(desktop_cycle_popup, CenterGravity, a->x + a->width / 2, a->y + a->height / 2); - /* XXX the size and the font extents need to be related on some level - */ - pager_popup_size(desktop_cycle_popup, POPUP_WIDTH, POPUP_HEIGHT); - - pager_popup_set_text_align(desktop_cycle_popup, RR_JUSTIFY_CENTER); + pager_popup_width(desktop_cycle_popup, MAX(a->width/3, POPUP_WIDTH)); + pager_popup_height(desktop_cycle_popup, POPUP_HEIGHT); pager_popup_show(desktop_cycle_popup, screen_desktop_names[d], d); } @@ -860,7 +860,7 @@ void screen_update_desktop_names() } } -void screen_show_desktop(gboolean show) +void screen_show_desktop(gboolean show, gboolean restore_focus) { GList *it; @@ -895,7 +895,7 @@ void screen_show_desktop(gboolean show) client_focus(it->data)) break; } - } else { + } else if (restore_focus) { ObClient *c; /* use NULL for the "old" argument because the desktop was focused