X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=openbox%2Fclient.c;h=9c8b2ee172cd3fd183ed85d433c676e75ed85091;hb=7cf4c970ae89f06aa77345900f96a310400c8595;hp=c8f26dcc5ba28748f4d252b1d6a4ec1a3ba871c5;hpb=081c7c0cfe2e9808433ba35f33172e8b633ba0fe;p=chaz%2Fopenbox diff --git a/openbox/client.c b/openbox/client.c index c8f26dcc..9c8b2ee1 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -397,6 +397,9 @@ void client_manage(Window window) self->area.width = MIN(self->area.width, a.width); self->area.height = MIN(self->area.height, a.height); + ob_debug("setting window size to %dx%d\n", + self->area.width, self->area.height); + /* adjust the frame to the client's new size */ frame_adjust_area(self->frame, FALSE, TRUE, FALSE); frame_adjust_client_area(self->frame); @@ -483,10 +486,24 @@ void client_manage(Window window) "Not focusing the window because the time is " "too old\n"); } + /* If its a transient (and parents aren't focused) and the time + is ambiguous (either the current focus target doesn't have + a timestamp, or they are the same (we probably inherited it + from them) */ + else if (self->transient_for != NULL && + (!last_time || self->user_time == last_time)) + { + activate = FALSE; + ob_debug_type(OB_DEBUG_FOCUS, + "Not focusing the window because it is a " + "transient, and the time is very ambiguous\n"); + } /* Don't steal focus from globally active clients. I stole this idea from KWin. It seems nice. */ - if (!(focus_client->can_focus || focus_client->focus_notify)) { + else if (!(focus_client->can_focus || + focus_client->focus_notify)) + { activate = FALSE; ob_debug_type(OB_DEBUG_FOCUS, "Not focusing the window because a globally " @@ -1968,8 +1985,14 @@ void client_update_title(ObClient *self) PROP_GETS(self->window, wm_icon_name, utf8, &data))) data = g_strdup(self->title); - PROP_SETS(self->window, net_wm_visible_icon_name, data); - self->icon_title = data; + if (self->client_machine) { + visible = g_strdup_printf("%s (%s)", data, self->client_machine); + g_free(data); + } else + visible = data; + + PROP_SETS(self->window, net_wm_visible_icon_name, visible); + self->icon_title = visible; } void client_update_strut(ObClient *self) @@ -2979,9 +3002,8 @@ static void client_iconify_recursive(ObClient *self, self->iconic = iconic; /* update the focus lists.. iconic windows go to the bottom of - the list, put the new iconic window at the 'top of the - bottom'. */ - focus_order_to_top(self); + the list */ + focus_order_to_bottom(self); changed = TRUE; }