diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-09-15 11:29:17 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-09-15 11:29:17 +0000 |
| commit | 3a607fad9df628ab16e0f7436dfbfc9b22634003 (patch) | |
| tree | c0ecef407854de06971ac9b361e3e155bae5dac4 /openbox/client.c | |
| parent | ebf24d5224781e47b62cf20fb3852ef9782f200b (diff) | |
revert my commit of d3th, it fucked up focus badly
Diffstat (limited to 'openbox/client.c')
| -rw-r--r-- | openbox/client.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/openbox/client.c b/openbox/client.c index 83291132..59af202a 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -1647,9 +1647,7 @@ static ObStackingLayer calc_layer(ObClient *self) { ObStackingLayer l; - if (self->fullscreen && - (client_focused(self) || client_search_focus_tree(self))) - l = OB_STACKING_LAYER_FULLSCREEN; + if (self->fullscreen) l = OB_STACKING_LAYER_FULLSCREEN; else if (self->type == OB_CLIENT_TYPE_DESKTOP) l = OB_STACKING_LAYER_DESKTOP; else if (self->type == OB_CLIENT_TYPE_DOCK) { @@ -1671,9 +1669,7 @@ static void client_calc_layer_recursive(ObClient *self, ObClient *orig, old = self->layer; own = calc_layer(self); - self->layer = MAX(l, own); - - g_message("calc for 0x%x %d %d", self->window, old, self->layer); + self->layer = l > own ? l : own; for (it = self->transients; it; it = it->next) client_calc_layer_recursive(it->data, orig, @@ -1681,6 +1677,7 @@ static void client_calc_layer_recursive(ObClient *self, ObClient *orig, if (!raised && l != old) if (orig->frame) { /* only restack if the original window is managed */ + /* XXX add_non_intrusive ever? */ stacking_remove(CLIENT_AS_WINDOW(self)); stacking_add(CLIENT_AS_WINDOW(self)); } @@ -2529,15 +2526,14 @@ gboolean client_focus(ObClient *self) /* choose the correct target */ self = client_focus_target(self); - if (!self->frame->visible) { - /* update the focus lists */ - focus_order_to_top(self); + if (!client_can_focus(self)) { + if (!self->frame->visible) { + /* update the focus lists */ + focus_order_to_top(self); + } return FALSE; } - if (!client_can_focus(self)) - return FALSE; - if (self->can_focus) { /* RevertToPointerRoot causes much more headache than RevertToNone, so I choose to use it always, hopefully to find errors quicker, if any @@ -2565,8 +2561,6 @@ gboolean client_focus(ObClient *self) XSendEvent(ob_display, self->window, FALSE, NoEventMask, &ce); } - focus_set_client(self); - #ifdef DEBUG_FOCUS ob_debug("%sively focusing %lx at %d\n", (self->can_focus ? "act" : "pass"), |
