mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-21 21:38:00 +01:00
changed indentation to use spaces only
This commit is contained in:
68
src/wcore.c
68
src/wcore.c
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* 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
|
||||
@@ -15,7 +15,7 @@
|
||||
*
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
@@ -51,7 +51,7 @@ extern XContext wWinContext;
|
||||
*/
|
||||
WCoreWindow*
|
||||
wCoreCreateTopLevel(WScreen *screen, int x, int y, int width, int height,
|
||||
int bwidth)
|
||||
int bwidth)
|
||||
{
|
||||
WCoreWindow *core;
|
||||
int vmask;
|
||||
@@ -60,10 +60,10 @@ wCoreCreateTopLevel(WScreen *screen, int x, int y, int width, int height,
|
||||
core = wmalloc(sizeof(WCoreWindow));
|
||||
memset(core, 0, sizeof(WCoreWindow));
|
||||
|
||||
/* don't set CWBackPixel so that transparent XRender windows
|
||||
/* don't set CWBackPixel so that transparent XRender windows
|
||||
are see-through */
|
||||
vmask = /*CWBackPixmap|CWBackPixel|*/CWBorderPixel|CWCursor|CWEventMask
|
||||
|CWOverrideRedirect;
|
||||
|CWOverrideRedirect;
|
||||
attribs.override_redirect = True;
|
||||
attribs.cursor = wCursor[WCUR_DEFAULT];
|
||||
attribs.background_pixmap = None;
|
||||
@@ -77,14 +77,14 @@ wCoreCreateTopLevel(WScreen *screen, int x, int y, int width, int height,
|
||||
attribs.colormap = screen->w_colormap;
|
||||
|
||||
core->window = XCreateWindow(dpy, screen->root_win, x, y, width, height,
|
||||
bwidth, screen->w_depth, CopyFromParent,
|
||||
screen->w_visual, vmask, &attribs);
|
||||
bwidth, screen->w_depth, CopyFromParent,
|
||||
screen->w_visual, vmask, &attribs);
|
||||
core->width = width;
|
||||
core->height = height;
|
||||
core->screen_ptr = screen;
|
||||
|
||||
core->descriptor.self = core;
|
||||
|
||||
|
||||
XClearWindow(dpy, core->window);
|
||||
|
||||
XSaveContext(dpy, core->window, wWinContext, (XPointer)&core->descriptor);
|
||||
@@ -94,21 +94,21 @@ wCoreCreateTopLevel(WScreen *screen, int x, int y, int width, int height,
|
||||
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*----------------------------------------------------------------------
|
||||
* wCoreCreate--
|
||||
* Creates a brand new child window.
|
||||
* The window will have a border width of 0 and color is black.
|
||||
*
|
||||
*
|
||||
* Returns:
|
||||
* A initialized core window structure.
|
||||
*
|
||||
*
|
||||
* Side effects:
|
||||
* A window context for the created window is saved.
|
||||
*
|
||||
*
|
||||
* Notes:
|
||||
* The event mask is initialized to a default value.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
WCoreWindow*
|
||||
wCoreCreate(WCoreWindow *parent, int x, int y, int width, int height)
|
||||
@@ -125,16 +125,16 @@ wCoreCreate(WCoreWindow *parent, int x, int y, int width, int height)
|
||||
attribs.background_pixmap = None;
|
||||
attribs.background_pixel = parent->screen_ptr->black_pixel;
|
||||
attribs.event_mask = KeyPressMask | KeyReleaseMask | ButtonPressMask
|
||||
| ButtonReleaseMask | ButtonMotionMask | ExposureMask | EnterWindowMask
|
||||
| LeaveWindowMask;
|
||||
| ButtonReleaseMask | ButtonMotionMask | ExposureMask | EnterWindowMask
|
||||
| LeaveWindowMask;
|
||||
/*
|
||||
vmask |= CWColormap;
|
||||
attribs.colormap = parent->screen_ptr->w_colormap;
|
||||
vmask |= CWColormap;
|
||||
attribs.colormap = parent->screen_ptr->w_colormap;
|
||||
*/
|
||||
core->window =
|
||||
XCreateWindow(dpy, parent->window, x, y, width, height, 0,
|
||||
parent->screen_ptr->w_depth, CopyFromParent,
|
||||
parent->screen_ptr->w_visual, vmask, &attribs);
|
||||
XCreateWindow(dpy, parent->window, x, y, width, height, 0,
|
||||
parent->screen_ptr->w_depth, CopyFromParent,
|
||||
parent->screen_ptr->w_visual, vmask, &attribs);
|
||||
core->width=width;
|
||||
core->height=height;
|
||||
core->screen_ptr = parent->screen_ptr;
|
||||
@@ -151,7 +151,7 @@ void
|
||||
wCoreDestroy(WCoreWindow *core)
|
||||
{
|
||||
if (core->stacking) {
|
||||
wfree(core->stacking);
|
||||
wfree(core->stacking);
|
||||
}
|
||||
XDeleteContext(dpy, core->window, wWinContext);
|
||||
XDestroyWindow(dpy, core->window);
|
||||
@@ -164,22 +164,22 @@ wCoreConfigure(WCoreWindow *core, int req_x, int req_y, int req_w, int req_h)
|
||||
{
|
||||
XWindowChanges xwc;
|
||||
unsigned int mask;
|
||||
|
||||
|
||||
mask = CWX|CWY;
|
||||
xwc.x = req_x;
|
||||
xwc.y = req_y;
|
||||
|
||||
if (req_w <= 0)
|
||||
req_w = core->width;
|
||||
|
||||
if (req_w <= 0)
|
||||
req_w = core->width;
|
||||
if (req_h <= 0)
|
||||
req_h = core->height;
|
||||
|
||||
req_h = core->height;
|
||||
|
||||
if (req_w != core->width || req_h != core->height) {
|
||||
mask |= CWWidth | CWHeight;
|
||||
xwc.width = req_w;
|
||||
xwc.height = req_h;
|
||||
core->width = req_w;
|
||||
core->height = req_h;
|
||||
mask |= CWWidth | CWHeight;
|
||||
xwc.width = req_w;
|
||||
xwc.height = req_h;
|
||||
core->width = req_w;
|
||||
core->height = req_h;
|
||||
}
|
||||
XConfigureWindow(dpy, core->window, mask, &xwc);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user