mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 21:08:08 +01:00
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!
56 lines
1.7 KiB
C
56 lines
1.7 KiB
C
/*
|
|
* Window Maker window manager
|
|
*
|
|
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
*/
|
|
|
|
|
|
#ifndef WMCORE_H_
|
|
#define WMCORE_H_
|
|
|
|
#include "screen.h"
|
|
|
|
typedef struct WStacking {
|
|
struct _WCoreWindow *above;
|
|
struct _WCoreWindow *under;
|
|
short window_level;
|
|
struct _WCoreWindow *child_of; /* owner for transient window */
|
|
} WStacking;
|
|
|
|
typedef struct _WCoreWindow {
|
|
Window window;
|
|
int width; /* size of the window */
|
|
int height;
|
|
WScreen *screen_ptr; /* ptr to screen of the window */
|
|
|
|
WObjDescriptor descriptor;
|
|
WStacking *stacking; /* window stacking information */
|
|
} WCoreWindow;
|
|
|
|
WCoreWindow *wCoreCreateTopLevel(WScreen *screen, int x, int y, int width,
|
|
int height, int bwidth,
|
|
int depth, Visual *visual, Colormap colormap,
|
|
WMPixel border_pixel);
|
|
|
|
WCoreWindow *wCoreCreate(WCoreWindow *parent, int x, int y,
|
|
int width, int height);
|
|
|
|
void wCoreDestroy(WCoreWindow *core);
|
|
void wCoreConfigure(WCoreWindow *core, int req_x, int req_y,
|
|
int req_w, int req_h);
|
|
#endif
|