1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-21 05:18:06 +01:00

wmaker: Moved definition of X Contexts into the global variables structure

This commit is contained in:
Christophe CURIS
2013-09-29 13:22:58 +02:00
committed by Carlos R. Mafra
parent e2ce62eb5b
commit ec91b9f68e
12 changed files with 35 additions and 56 deletions

View File

@@ -29,8 +29,6 @@
#include "WindowMaker.h"
#include "wcore.h"
/****** Global Variables ******/
extern XContext wWinContext;
/*----------------------------------------------------------------------
* wCoreCreateTopLevel--
@@ -72,7 +70,7 @@ WCoreWindow *wCoreCreateTopLevel(WScreen *screen, int x, int y, int width, int h
core->descriptor.self = core;
XClearWindow(dpy, core->window);
XSaveContext(dpy, core->window, wWinContext, (XPointer) & core->descriptor);
XSaveContext(dpy, core->window, w_global.context.client_win, (XPointer) & core->descriptor);
return core;
}
@@ -116,7 +114,7 @@ WCoreWindow *wCoreCreate(WCoreWindow *parent, int x, int y, int width, int heigh
core->screen_ptr = parent->screen_ptr;
core->descriptor.self = core;
XSaveContext(dpy, core->window, wWinContext, (XPointer) & core->descriptor);
XSaveContext(dpy, core->window, w_global.context.client_win, (XPointer) & core->descriptor);
return core;
}
@@ -125,7 +123,7 @@ void wCoreDestroy(WCoreWindow * core)
if (core->stacking)
wfree(core->stacking);
XDeleteContext(dpy, core->window, wWinContext);
XDeleteContext(dpy, core->window, w_global.context.client_win);
XDestroyWindow(dpy, core->window);
wfree(core);
}