X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Ffocus.c;h=9949dea3a68fb337ad79a025e75b5985450d45ed;hb=35ed95fe18e9b8d7a79f79f4fd7466a2b46435e3;hp=a04e4d401e64a4e6e12c1f6db7cb282447467fc8;hpb=112629400bab0e12b27e98e11654c76e87466454;p=chaz%2Fopenbox diff --git a/openbox/focus.c b/openbox/focus.c index a04e4d40..9949dea3 100644 --- a/openbox/focus.c +++ b/openbox/focus.c @@ -1,3 +1,4 @@ +#include "debug.h" #include "event.h" #include "openbox.h" #include "grab.h" @@ -18,11 +19,11 @@ #include ObClient *focus_client; -GList **focus_order = NULL; /* these lists are created when screen_startup - sets the number of desktops */ +GList **focus_order; /* these lists are created when screen_startup + sets the number of desktops */ -static ObClient *focus_cycle_target = NULL; -static Popup *focus_cycle_popup = NULL; +static ObClient *focus_cycle_target; +static Popup *focus_cycle_popup; void focus_startup() { @@ -64,7 +65,7 @@ void focus_set_client(ObClient *client) ObClient *old; #ifdef DEBUG_FOCUS - g_message("focus_set_client 0x%lx", client ? client->window : 0); + ob_debug("focus_set_client 0x%lx\n", client ? client->window : 0); #endif /* uninstall the old colormap, and install the new one */ @@ -239,7 +240,7 @@ static void popup_cycle(ObClient *c, gboolean show) */ /* XXX the size and the font extents need to be related on some level */ - popup_size(focus_cycle_popup, 320, 48); + popup_size(focus_cycle_popup, POPUP_WIDTH, POPUP_HEIGHT); /* use the transient's parent's title/icon */ while (p->transient_for && p->transient_for != OB_TRAN_GROUP) @@ -261,7 +262,7 @@ static void popup_cycle(ObClient *c, gboolean show) } ObClient *focus_cycle(gboolean forward, gboolean linear, gboolean done, - gboolean cancel) + gboolean cancel) { static ObClient *first = NULL; static ObClient *t = NULL; @@ -280,8 +281,6 @@ ObClient *focus_cycle(gboolean forward, gboolean linear, gboolean done, client_activate(focus_cycle_target); goto done_cycle; } - if (!first) - grab_pointer(TRUE, None); if (!first) first = focus_client; if (!focus_cycle_target) focus_cycle_target = focus_client; @@ -330,7 +329,6 @@ done_cycle: order = NULL; popup_cycle(ft, FALSE); - grab_pointer(FALSE, None); return NULL; }