X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Ffocus.c;h=edd26b69fa4ca4bf1b8a01aadbc3f79531d93df0;hb=48a7c32512db4358dc7c2928174bccc203d30e69;hp=6a56c2f819bccd72ca767e866e1fe6ee64a94bc4;hpb=dce6247e693a4880b1f77252460d445825efc13c;p=chaz%2Fopenbox diff --git a/openbox/focus.c b/openbox/focus.c index 6a56c2f8..edd26b69 100644 --- a/openbox/focus.c +++ b/openbox/focus.c @@ -1,7 +1,7 @@ /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*- focus.c for the Openbox window manager - Copyright (c) 2004 Mikael Magnusson + Copyright (c) 2006 Mikael Magnusson Copyright (c) 2003 Ben Jansens This program is free software; you can redistribute it and/or modify @@ -87,25 +87,20 @@ void focus_startup(gboolean reconfig) focus_indicator.right.obwin.type = Window_Internal; focus_indicator.bottom.obwin.type = Window_Internal; - attr.save_under = True; attr.override_redirect = True; attr.background_pixel = BlackPixel(ob_display, ob_screen); focus_indicator.top.win = createWindow(RootWindow(ob_display, ob_screen), - CWOverrideRedirect | CWBackPixel | CWSaveUnder, - &attr); + CWOverrideRedirect | CWBackPixel, &attr); focus_indicator.left.win = createWindow(RootWindow(ob_display, ob_screen), - CWOverrideRedirect | CWBackPixel | CWSaveUnder, - &attr); + CWOverrideRedirect | CWBackPixel, &attr); focus_indicator.right.win = createWindow(RootWindow(ob_display, ob_screen), - CWOverrideRedirect | CWBackPixel | CWSaveUnder, - &attr); + CWOverrideRedirect | CWBackPixel, &attr); focus_indicator.bottom.win = createWindow(RootWindow(ob_display, ob_screen), - CWOverrideRedirect | CWBackPixel | CWSaveUnder, - &attr); + CWOverrideRedirect | CWBackPixel, &attr); stacking_add(INTERNAL_AS_WINDOW(&focus_indicator.top)); stacking_add(INTERNAL_AS_WINDOW(&focus_indicator.left)); @@ -144,7 +139,7 @@ void focus_shutdown(gboolean reconfig) g_free(focus_order); /* reset focus to root */ - XSetInputFocus(ob_display, PointerRoot, RevertToNone, event_lasttime); + XSetInputFocus(ob_display, PointerRoot, RevertToNone, CurrentTime); RrColorFree(color_white); @@ -186,7 +181,7 @@ void focus_set_client(ObClient *client) #endif /* when nothing will be focused, send focus to the backup target */ XSetInputFocus(ob_display, screen_support_win, RevertToNone, - event_lasttime); + event_curtime); XSync(ob_display, FALSE); } @@ -318,6 +313,11 @@ ObClient* focus_fallback_target(ObFocusFallbackType type) if (client_normal(it->data) && client_can_focus(it->data)) return it->data; + /* XXX fallback to the "desktop window" if one exists ? + could store it while going through all the windows in the loop right + above this.. + */ + return NULL; } @@ -603,7 +603,7 @@ void focus_cycle(gboolean forward, gboolean linear, gboolean interactive, done_cycle: if (done && focus_cycle_target) - client_activate(focus_cycle_target, FALSE); + client_activate(focus_cycle_target, FALSE, TRUE); t = NULL; first = NULL; @@ -665,7 +665,7 @@ void focus_directional_cycle(ObDirection dir, gboolean interactive, done_cycle: if (done && focus_cycle_target) - client_activate(focus_cycle_target, FALSE); + client_activate(focus_cycle_target, FALSE, TRUE); first = NULL; focus_cycle_target = NULL;