[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Pkg-xfce-devel] Bug#624475: Info received ( Bug#624475: xfwm4: windows sometimes cannot be unshaded)



Here's a patch that takes one possible approach to fixing the problem.  It 
assumes that, when a window is shaded, an edge doubleclick means that the 
user is trying to unshade the window.

This patch has also been posted to the upstream bug tracker at:

https://bugzilla.xfce.org/show_bug.cgi?id=7549

regards,

- Paul
-------------- next part --------------
From: Paul Walmsley <paul at booyaka.com>

When a window is shaded, a doubleclick on its edge should
be interpreted to mean that the user is trying to unshade
the window.  Otherwise, xfwm4 will corrupt the window's size
information.

This is one possible fix for Debian bug 624475.


--- src/events.c.backup	2011-04-28 15:05:18.541353140 -0600
+++ src/events.c	2011-04-28 15:08:30.926262260 -0600
@@ -572,19 +572,26 @@
         tclick = typeOfClick (screen_info, c->window, (XEvent *) ev, TRUE);
         if (tclick == XFWM_BUTTON_DOUBLE_CLICK)
         {
-            switch (part)
+            if (FLAG_TEST (c->flags, CLIENT_FLAG_SHADED))
             {
-                case CORNER_COUNT + SIDE_LEFT:
-                case CORNER_COUNT + SIDE_RIGHT:
-                    clientFill(c, CLIENT_FILL_HORIZ);
-                    break;
-                case CORNER_COUNT + SIDE_TOP:
-                case CORNER_COUNT + SIDE_BOTTOM:
-                    clientFill(c, CLIENT_FILL_VERT);
-                    break;
-                default:
-                    clientFill(c, CLIENT_FILL);
-                    break;
+                clientUnshade(c);  
+            }
+            else
+            {
+                switch (part)
+                {
+                    case CORNER_COUNT + SIDE_LEFT:
+                    case CORNER_COUNT + SIDE_RIGHT:
+                        clientFill(c, CLIENT_FILL_HORIZ);
+                        break;
+                    case CORNER_COUNT + SIDE_TOP:
+                    case CORNER_COUNT + SIDE_BOTTOM:
+                        clientFill(c, CLIENT_FILL_VERT);
+                        break;
+                    default:
+                        clientFill(c, CLIENT_FILL);
+                        break;
+                }
             }
         }
         else if (tclick == XFWM_BUTTON_DRAG)



Reply to: