Window attributes moved to wCoreCreateTopLevel
commitbb48c355223d33fd2237b5e6c5c15b9aab3ce876
authorRodolfo García Peñas (kix) <kix@kix.es>
Wed, 20 Mar 2013 03:02:17 +0000 (20 04:02 +0100)
committerCarlos R. Mafra <crmafra@gmail.com>
Thu, 21 Mar 2013 10:01:04 +0000 (21 10:01 +0000)
tree572b980b814982dd2cac63867b0d99ac3149b4e4
parent42a4d95e5b17bc6f77289b911572a8148b0bc31a
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!
src/framewin.c
src/icon.c
src/wcore.c
src/wcore.h