Revert "Fixed incorrect attributes for XCreateWindow's attributes"
authorCarlos R. Mafra <crmafra@gmail.com>
Thu, 25 Oct 2012 23:21:39 +0000 (26 00:21 +0100)
committerCarlos R. Mafra <crmafra@gmail.com>
Sun, 28 Oct 2012 10:58:42 +0000 (28 10:58 +0000)
This reverts commit 824255b1ae225394dc093c193082cfb7186e3eda.

According to Iain Patterson:

  This patch breaks the frame extents stuff I submitted recently. With
the patch and compton set to draw semi-opaque frame extents what
actually happens is no window decorations are drawn and a bunch of
BadDrawable errors are spewed to the console.

  After reverting the patch everything works again.

src/wcore.c

index 3650591..1abe842 100644 (file)
@@ -51,9 +51,10 @@ WCoreWindow *wCoreCreateTopLevel(WScreen *screen, int x, int y, int width, int h
 
        core = wmalloc(sizeof(WCoreWindow));
 
-       vmask = CWBackPixel | CWBorderPixel | CWCursor | CWEventMask | CWOverrideRedirect | CWColormap;
+       vmask = CWBorderPixel | CWCursor | CWEventMask | CWOverrideRedirect | CWColormap;
        attribs.override_redirect = True;
        attribs.cursor = wCursor[WCUR_DEFAULT];
+       attribs.background_pixmap = None;
        attribs.background_pixel = screen->black_pixel;
        attribs.border_pixel = screen->frame_border_pixel;
        attribs.event_mask = SubstructureRedirectMask | ButtonPressMask |
@@ -97,8 +98,9 @@ WCoreWindow *wCoreCreate(WCoreWindow *parent, int x, int y, int width, int heigh
 
        core = wmalloc(sizeof(WCoreWindow));
 
-       vmask = CWBackPixel | CWCursor | CWEventMask | CWColormap;
+       vmask = CWBorderPixel | CWCursor | CWEventMask | CWColormap;
        attribs.cursor = wCursor[WCUR_DEFAULT];
+       attribs.background_pixmap = None;
        attribs.background_pixel = parent->screen_ptr->black_pixel;
        attribs.event_mask = KeyPressMask | KeyReleaseMask | ButtonPressMask |
                             ButtonReleaseMask | ButtonMotionMask |