On Fri, Jul 02, 2004 at 02:44:02PM +0200, Dominik Vogt wrote:
> > Is it worth submiting the patch?
> 
> Yes.
> 

Thanks for the reply Dominik, This is the patch I've been using, I'm
sure it's horribly wrong, but it does seem to get Swallowed transparent
windows updated correctly :)

Maybe it will at least help demonstrate what I was talking about :)

-- 
-------------------------------------
[EMAIL PROTECTED] | finger me for my gpg key.
-------------------------------------------------------
Index: FvwmButtons.c
===================================================================
RCS file: /home/cvs/fvwm/fvwm/modules/FvwmButtons/FvwmButtons.c,v
retrieving revision 1.186
diff -u -w -r1.186 FvwmButtons.c
--- FvwmButtons.c       29 Jun 2004 18:05:55 -0000      1.186
+++ FvwmButtons.c       2 Jul 2004 22:06:16 -0000
@@ -1070,7 +1070,43 @@
        else if (Event.xconfigure.window == MyWindow &&
                 Event.xconfigure.send_event)
        {
+         button=-1;
+         ub=UberButton;
+
          update_root_transparency(&Event);
+         while(NextButton(&ub,&b,&button,0))
+         {
+                 if (b->flags & b_Swallow && SwallowedWindow(b))
+                 {
+                         Window swin = SwallowedWindow(b), br;
+                         XEvent BEvent;
+                         unsigned int bx, by, bw, bh, bbw, bd;
+
+                         if (!XGetGeometry(Dpy, swin, &br, &bx, &by, &bw, &bh, 
&bbw, &bd))
+                         {
+                               continue;
+                         }
+
+#ifdef DEBUG_EVENTS
+                         fprintf (stderr, "Sending ConfigureNotify to Button: 
%#9x\n"
+                               "New Position: %ux%u\n", 
+                                       (int) swin, 
+                                       Event.xconfigure.x+b->x, 
+                                       Event.xconfigure.y+b->y);
+#endif
+
+                     BEvent.type = ConfigureNotify;
+                     BEvent.xconfigure.display = Dpy;
+                     BEvent.xconfigure.event = swin;
+                     BEvent.xconfigure.window = swin;
+                     BEvent.xconfigure.x = Event.xconfigure.x+bx;
+                     BEvent.xconfigure.y = Event.xconfigure.y+by;
+                     BEvent.xconfigure.width = bw;
+                     BEvent.xconfigure.height = bh;
+                     BEvent.xconfigure.border_width = bbw;
+                     FSendEvent(Dpy, swin, False, StructureNotifyMask, 
&BEvent);
+                 }
+         }
        }
       }
       break;

Reply via email to