diff options
author | marha <marha@users.sourceforge.net> | 2011-03-07 07:56:07 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-03-07 07:56:07 +0000 |
commit | 43ac73d271f697d91670fd6cb120489acc03aaeb (patch) | |
tree | 2109e1e6eac063c74cc146842aeeeb27a86cec02 /xorg-server/hw/xwin/winmultiwindowwm.c | |
parent | 4f70194d203322cf1ec38767098976797c116f0c (diff) | |
download | vcxsrv-43ac73d271f697d91670fd6cb120489acc03aaeb.tar.gz vcxsrv-43ac73d271f697d91670fd6cb120489acc03aaeb.tar.bz2 vcxsrv-43ac73d271f697d91670fd6cb120489acc03aaeb.zip |
Made winOverrideStyle thread safe
Diffstat (limited to 'xorg-server/hw/xwin/winmultiwindowwm.c')
-rw-r--r-- | xorg-server/hw/xwin/winmultiwindowwm.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/xorg-server/hw/xwin/winmultiwindowwm.c b/xorg-server/hw/xwin/winmultiwindowwm.c index b59a2e9b0..f05fe79ae 100644 --- a/xorg-server/hw/xwin/winmultiwindowwm.c +++ b/xorg-server/hw/xwin/winmultiwindowwm.c @@ -1535,7 +1535,6 @@ winApplyHints (Display *pDisplay, Window iWindow, HWND hWnd, HWND *zstyle) Atom type, *pAtom = NULL;
int format;
unsigned long hint = 0, maxmin = 0, style, nitems = 0 , left = 0;
- WindowPtr pWin = GetProp (hWnd, WIN_WINDOW_PROP);
MwmHints *mwm_hint = NULL;
WinXSizeHints SizeHints;
@@ -1629,7 +1628,25 @@ winApplyHints (Display *pDisplay, Window iWindow, HWND hWnd, HWND *zstyle) }
/* Override hint settings from above with settings from config file */
- style = winOverrideStyle((unsigned long)pWin);
+ {
+ XClassHint class_hint = {0,0};
+
+ if (XGetClassHint(pDisplay, iWindow, &class_hint))
+ {
+ char *window_name = 0;
+ XFetchName(pDisplay, iWindow, &window_name);
+
+ style = winOverrideStyle(class_hint.res_name, class_hint.res_class, window_name);
+
+ if (class_hint.res_name) XFree(class_hint.res_name);
+ if (class_hint.res_class) XFree(class_hint.res_class);
+ if (window_name) XFree(window_name);
+ }
+ else
+ {
+ style = STYLE_NONE;
+ }
+ }
if (style & STYLE_TOPMOST) *zstyle = HWND_TOPMOST;
else if (style & STYLE_MAXIMIZE) maxmin = (hint & ~HINT_MIN) | HINT_MAX;
else if (style & STYLE_MINIMIZE) maxmin = (hint & ~HINT_MAX) | HINT_MIN;
|