X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Ffocus.c;h=3b4dd14537c6b641194ba73376b7355bc5066729;hb=2aa5cd3574b2bbdc103cb7626aa1ff77ea2c0046;hp=04d4d31a9fe45f26b98bce0b0bb739dfebf4a053;hpb=b051b3499dc38e083d580fbedef70bdbbc9caa78;p=chaz%2Fopenbox diff --git a/openbox/focus.c b/openbox/focus.c index 04d4d31a..3b4dd145 100644 --- a/openbox/focus.c +++ b/openbox/focus.c @@ -60,7 +60,7 @@ static void focus_cycle_destructor(ObClient *client, gpointer data) focus_cycle(TRUE, TRUE, TRUE, TRUE, TRUE); } -static Window createWindow(Window parent, unsigned long mask, +static Window createWindow(Window parent, gulong mask, XSetWindowAttributes *attrib) { return XCreateWindow(ob_display, parent, 0, 0, 1, 1, 0, @@ -210,7 +210,8 @@ void focus_set_client(ObClient *client) /* finds the first transient that isn't 'skip' and ensure's that client_normal is true for it */ -static ObClient *find_transient_recursive(ObClient *c, ObClient *top, ObClient *skip) +static ObClient *find_transient_recursive(ObClient *c, ObClient *top, + ObClient *skip) { GSList *it; ObClient *ret; @@ -332,7 +333,7 @@ static void popup_cycle(ObClient *c, gboolean show) } else { Rect *a; ObClient *p = c; - char *title; + gchar *title; a = screen_physical_area_monitor(0); icon_popup_position(focus_cycle_popup, CenterGravity, @@ -378,8 +379,8 @@ void focus_cycle_draw_indicator() frame_adjust_focus(focus_cycle_target->frame, FALSE); frame_adjust_focus(focus_cycle_target->frame, TRUE); */ - int x, y, w, h; - int wt, wl, wr, wb; + gint x, y, w, h; + gint wt, wl, wr, wb; wt = wl = wr = wb = MAX(3, ob_rr_theme->handle_height + @@ -512,7 +513,10 @@ static gboolean valid_focus_target(ObClient *ft) ft->type == OB_CLIENT_TYPE_UTILITY))) && ((ft->can_focus || ft->focus_notify) && !ft->skip_taskbar && - (ft->desktop == screen_desktop || ft->desktop == DESKTOP_ALL))) + (ft->desktop == screen_desktop || ft->desktop == DESKTOP_ALL)) && + ft == client_focus_target(ft)) + return TRUE; +/* { GSList *it; @@ -524,6 +528,7 @@ static gboolean valid_focus_target(ObClient *ft) } return TRUE; } +*/ return FALSE; } @@ -661,11 +666,12 @@ void focus_order_add_new(ObClient *c) else focus_order[i] = g_list_insert(focus_order[i], c, 1); } - } else - if (focus_order[d] && ((ObClient*)focus_order[d]->data)->iconic) + } else { + if (focus_order[d] && ((ObClient*)focus_order[d]->data)->iconic) focus_order[d] = g_list_insert(focus_order[d], c, 0); else focus_order[d] = g_list_insert(focus_order[d], c, 1); + } } }