summaryrefslogtreecommitdiff
path: root/hw/xwin/winwindow.h
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2012-07-21 14:09:16 +0100
committerJon TURNEY <jon.turney@dronecode.org.uk>2012-08-03 22:47:42 +0100
commit527cf13135cfd279733060e0028bbfbe02be5167 (patch)
tree8f582fa4baece578cc7193392e87aa8fe8a0197b /hw/xwin/winwindow.h
parent2677d89823b851fea31036f51589985bb86864b7 (diff)
hw/xwin: Make winOverrideIcon() thread-safe for icon data access
winOverrideIcon() is called from the internal WM client thread. Accessing server-internal data structures to get icon data or window hints is not safe, as there is no lock to ensure we do not collide with these data structures being updated in the server thread. Rewrite so the internal client thread uses X client calls to obtain this data safely We used to also set the icon inside the server when the window was initially created. For simplicity, we simply send a message to the internal WM to update the icon when the window is created (rather than writing different icon update code which can work in the server thread for that one case...) extwm mode used to do the icon update in the server. I'm not sure that actually made much sense. Let's assume the external WM client can do it instead... v2 Make sure that WM_WM_ICON_EVENT does nothing for override-redirect windows v3 Reinstate check that native window actually has expected properties for an X window before trying to update it's icon; some auxiliary windows owned by the XWin process don't, which would cause a crash v4 Various fixes to pixmap icon conversion: - remove left-over malloc in winScaleXimageToWindowsIcon causing a memory leak - don't recalculate DDBitmap stride in winScaleXimageToWindowsIcon, when we already have worked it out - properly check that XGetWindowProperty(NET_WM_ICON) returned some data - don't try to retrieve WM_HINTS icon_mask if it isn't set - restore accidentally dropped calculation of effBpp, stride, maskStride of output DDBitmap - make sure imageMask is zero-initalized before we use it to mask the DDBitmap v5 Remove a left-over unused variable v6 Avoid XDestroyImage(NULL) crash if XGetImage failed for icon_pixmap Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Diffstat (limited to 'hw/xwin/winwindow.h')
-rw-r--r--hw/xwin/winwindow.h13
1 files changed, 0 insertions, 13 deletions
diff --git a/hw/xwin/winwindow.h b/hw/xwin/winwindow.h
index 9f2ab45f3..a5919ee4d 100644
--- a/hw/xwin/winwindow.h
+++ b/hw/xwin/winwindow.h
@@ -157,18 +157,5 @@ void
void
winMinimizeWindow(Window id);
-/*
- * winmultiwindowicons.c
- */
-
-void
- winUpdateIcon(Window id);
-
-void
- winInitGlobalIcons(void);
-
-void
- winDestroyIcon(HICON hIcon);
-
#endif /* XWIN_MULTIWINDOW */
#endif