]> Dogcows Code - chaz/openbox/commitdiff
let windows that cant iconify still iconify with their parents, but not non-normal...
authorDana Jansens <danakj@orodu.net>
Tue, 8 May 2007 22:53:09 +0000 (22:53 +0000)
committerDana Jansens <danakj@orodu.net>
Tue, 8 May 2007 22:53:09 +0000 (22:53 +0000)
let you focus windows that wouldnt normally by clicking on their decor (if they have any)

openbox/action.c
openbox/client.c
openbox/client.h

index 4ff6bdb95b7049c6e310c4834b807e5e39fadfda..4839088c710ffc25e20606f40efd4656fff3e62c 100644 (file)
@@ -1199,7 +1199,9 @@ void action_execute(union ActionData *data)
 void action_activate(union ActionData *data)
 {
     if (data->client.any.c) {
-        if (!data->any.button || client_mouse_focusable(data->client.any.c)) {
+        if (!data->any.button || client_mouse_focusable(data->client.any.c) ||
+            data->any.context != OB_FRAME_CONTEXT_CLIENT)
+        {
             /* if using focus_delay, stop the timer now so that focus doesn't
                go moving on us */
             event_halt_focus_delay();
@@ -1217,7 +1219,9 @@ void action_activate(union ActionData *data)
 void action_focus(union ActionData *data)
 {
     if (data->client.any.c) {
-        if (!data->any.button || client_mouse_focusable(data->client.any.c)) {
+        if (!data->any.button || client_mouse_focusable(data->client.any.c) ||
+            data->any.context != OB_FRAME_CONTEXT_CLIENT)
+        {
             /* if using focus_delay, stop the timer now so that focus doesn't
                go moving on us */
             event_halt_focus_delay();
index d50388e775f624421bc502cb1fc1e3c1ea4b0c2a..0084588c4905e5c258a1a84c76da58e3d6ac38e5 100644 (file)
@@ -2814,7 +2814,9 @@ static void client_iconify_recursive(ObClient *self,
                  self->window);
 
         if (iconic) {
-            if (self->functions & OB_CLIENT_FUNC_ICONIFY) {
+            /* don't let non-normal windows iconify along with their parents
+               or whatever */
+            if (client_normal(self)) {
                 self->iconic = iconic;
 
                 /* update the focus lists.. iconic windows go to the bottom of
index 5c5fdb90c3494f61c9bd9efcfea114a8247a9392..654945b91b6592cce94d3f4ecfc9f89b3da16eff 100644 (file)
@@ -339,8 +339,9 @@ gboolean client_normal(ObClient *self);
 gboolean client_helper(ObClient *self);
 
 /*! Return if the client is a type which should be given focus from mouse
-  actions like button presses. This doesn't count for focus cycling, different
-  rules apply to that. */
+  presses on the *client* window. This doesn't affect clicking on the
+  decorations. This doesn't count for focus cycling, different rules apply to
+  that. */
 gboolean client_mouse_focusable(ObClient *self);
 
 /*! Return if the client is a type which should be given focus from the
This page took 0.038279 seconds and 4 git commands to generate.