X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Fclient.c;h=a90dda6a4f5197c12bf26c25a8afc806da9fb906;hb=2a8ede00043f4f5b64beffdc604e0f17d57d3eb8;hp=c2ddd21a2b2e9311584db000eb859f26ab3ef3d7;hpb=174de91c343dfbdfe866e566393bf4790ae22596;p=chaz%2Fopenbox diff --git a/openbox/client.c b/openbox/client.c index c2ddd21a..a90dda6a 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -134,7 +134,7 @@ void client_set_list() } /* - void client_foreach_transient(ObClient *self, ObClientForeachFunc func, void *data) + void client_foreach_transient(ObClient *self, ObClientForeachFunc func, gpointer data) { GSList *it; @@ -144,7 +144,7 @@ void client_set_list() } } - void client_foreach_ancestor(ObClient *self, ObClientForeachFunc func, void *data) + void client_foreach_ancestor(ObClient *self, ObClientForeachFunc func, gpointer data) { if (self->transient_for) { if (self->transient_for != OB_TRAN_GROUP) { @@ -415,6 +415,10 @@ void client_unmanage(ObClient *self) keyboard_grab_for_client(self, FALSE); mouse_grab_for_client(self, FALSE); + /* potentially fix focusLast */ + if (config_focus_last) + grab_pointer(TRUE, OB_CURSOR_NONE); + /* remove the window from our save set */ XChangeSaveSet(ob_display, self->window, SetModeDelete); @@ -518,6 +522,9 @@ void client_unmanage(ObClient *self) /* update the list hints */ client_set_list(); + + if (config_focus_last) + grab_pointer(FALSE, OB_CURSOR_NONE); } static void client_urgent_notify(ObClient *self) @@ -720,6 +727,11 @@ static void client_get_all(ObClient *self) client_get_mwm_hints(self); client_get_type(self);/* this can change the mwmhints for special cases */ + /* The transient hint is used to pick a type, but the type can also affect + transiency (dialogs are always made transients). This is Havoc's idea, + but it is needed to make some apps work right (eg tsclient). */ + client_update_transient_for(self); + client_get_state(self); { @@ -928,6 +940,9 @@ void client_update_transient_for(ObClient *self) } } } + } else if (self->type == OB_CLIENT_TYPE_DIALOG && self->group) { + self->transient = TRUE; + target = OB_TRAN_GROUP; } else self->transient = FALSE; @@ -1490,6 +1505,12 @@ void client_update_title(ObClient *self) data = vdata; } + // http://developer.gnome.org/projects/gup/hig/draft_hig_new/windows-alert.html + if (self->transient) + data = '\0'; + else + data = g_strdup("Unnamed Window"); + PROP_SETS(self->window, net_wm_visible_icon_name, data); self->icon_title = data; @@ -2777,7 +2798,7 @@ void client_raise(ObClient *self) void client_lower(ObClient *self) { - action_run_string("Raise", self); + action_run_string("Lower", self); } gboolean client_focused(ObClient *self)