mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 04:48:06 +01:00
Window attributes moved to wCoreCreateTopLevel
The function wCoreCreateTopLevel() is used in two files (icon.c and framewin.c), but after create the window, some attributes are changed. This patch moves the change inside the wCoreCreateTopLevel(), avoiding to call XChangeWindowAttributes() after the window creation. Now the window is created in only one step, with all the final attributes. Some details: - The function wCoreCreateTopLevel() has now one argument more, the border pixel color. This attribute was used always as the screen frame_border_pixel, but in icon.c the attribute is changed to white_pixel. Now the function wCoreCreateTopLevel() receives the value frame_border_pixel in framewin.c and scr->white_pixel in icon.c, as argument. - The vmask and attribs variables and the call to XChangeWindowAttributes() are removed in framewin.c and icon.c. The values CWSaveUnder for vmask and attribs.save_under = True are used if wPreferences.use_saveunders is True. - CWBorderPixel is not needed in icon.c, because was previously set in wcore.c!
This commit is contained in:
committed by
Carlos R. Mafra
parent
42a4d95e5b
commit
bb48c35522
@@ -113,15 +113,7 @@ WFrameWindow *wFrameWindowCreate(WScreen * scr, int wlevel, int x, int y,
|
||||
allocFrameBorderPixel(fwin->colormap, FRAME_SELECTED_BORDER_COLOR, &fwin->selected_border_pixel);
|
||||
|
||||
fwin->core = wCoreCreateTopLevel(scr, x, y, width, height, (flags & WFF_BORDER)
|
||||
? FRAME_BORDER_WIDTH : 0, fwin->depth, fwin->visual, fwin->colormap);
|
||||
if (wPreferences.use_saveunders) {
|
||||
unsigned long vmask;
|
||||
XSetWindowAttributes attribs;
|
||||
|
||||
vmask = CWSaveUnder;
|
||||
attribs.save_under = True;
|
||||
XChangeWindowAttributes(dpy, fwin->core->window, vmask, &attribs);
|
||||
}
|
||||
? FRAME_BORDER_WIDTH : 0, fwin->depth, fwin->visual, fwin->colormap, scr->frame_border_pixel);
|
||||
|
||||
/* setup stacking information */
|
||||
fwin->core->stacking = wmalloc(sizeof(WStacking));
|
||||
|
||||
Reference in New Issue
Block a user