Go to file
Jon TURNEY 527cf13135 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>
2012-08-03 22:47:42 +01:00
composite Move extension initialisation prototypes into extinit.h 2012-07-09 23:06:41 -07:00
config Fix more poorly indented/wrapped comments & code 2012-07-09 19:14:50 -07:00
damageext Move extension initialisation prototypes into extinit.h 2012-07-09 23:06:41 -07:00
dbe Move extension initialisation prototypes into extinit.h 2012-07-09 23:06:41 -07:00
dix AllocDevicePair: Ensure XKB privates are initialised 2012-07-10 23:12:39 -07:00
doc Add screen-specific privates. 2012-07-05 13:39:50 -07:00
exa exa: pixmap sharing infrastructure (v3) 2012-07-07 10:37:10 +01:00
fb Use new screen-specific privates for fb window and gc privates 2012-07-05 13:40:18 -07:00
glx glx: Fix checking GL version 2012-07-13 11:25:04 +10:00
hw hw/xwin: Make winOverrideIcon() thread-safe for icon data access 2012-08-03 22:47:42 +01:00
include dix: don't use "new" as a parameter name 2012-07-25 09:27:11 -07:00
m4 Use XORG_STRICT_OPTION from util-macros 1.14 to set -Werror flags 2011-05-27 19:51:05 -07:00
man os: Add -displayfd option 2012-05-01 11:36:30 +10:00
mi XQuartz: Fix runtime regressions introduced by extension loading changes 2012-07-24 00:32:30 -07:00
miext cw: Remove 2012-07-25 14:02:44 -07:00
os xwin: Clean up os wrappers for System, Popen and Pclose on Windows 2012-07-17 16:08:04 +01:00
randr Use C99 designated initializers in RandR 1.4 extension Events 2012-07-16 21:25:07 -07:00
record Move extension initialisation prototypes into extinit.h 2012-07-09 23:06:41 -07:00
render Render: Remove unused glyphDepths 2012-07-10 00:42:09 -07:00
test xtest: add extinit.h for SyncExtensionInit 2012-07-12 15:16:23 -07:00
Xext Fix two more C99 initialization mistakes using members of same struct 2012-07-16 21:24:49 -07:00
xfixes Move extension initialisation prototypes into extinit.h 2012-07-09 23:06:41 -07:00
Xi Xi: Remove dead Device{Enter,Leave}WindowMask 2012-07-10 00:42:09 -07:00
xkb xwin: Clean up os wrappers for System, Popen and Pclose on Windows 2012-07-17 16:08:04 +01:00
.gitignore doc: relocate xserver.ent in the package root directory 2011-05-14 11:22:26 -07:00
autogen.sh autogen.sh: Pass --force to autoreconf 2008-07-22 16:55:26 +03:00
configure.ac Version 1.12.99.903 (1.13 RC3) 2012-07-25 14:29:48 -07:00
COPYING Loader: Remove extension initialisation sorting 2012-07-10 00:31:02 -07:00
devbook.am devbook.am: maintenance update from docbook.am 2011-09-21 14:07:52 -07:00
docbook.am docbook.am: embed css styles inside the HTML HEAD element 2011-09-21 14:07:49 -07:00
fix-miregion Change region implementation names to eliminate the 'mi' prefix 2010-06-05 17:47:32 -07:00
fix-miregion-private Change region implementation names to eliminate the 'mi' prefix 2010-06-05 17:47:32 -07:00
fix-patch-whitespace Rename region macros to eliminate screen argument 2010-06-05 18:59:00 -07:00
fix-region Rename region macros to eliminate screen argument 2010-06-05 18:59:00 -07:00
Makefile.am Add 'install-headers' target in the top-level Makefile 2012-07-09 16:29:04 -07:00
manpages.am Xdmx.man: Show actual configured XKB defaults instead of old hardcoded values 2011-06-21 17:54:14 -07:00
README packaging: provide a default README file #24206 2010-01-27 14:00:17 -08:00
xorg-server.m4 macros: use PKG_CONFIG variable rather than executable name 2010-01-07 12:57:23 -08:00
xorg-server.pc.in xfree86: link modules against Xorg symbols on Cygwin 2012-04-05 21:57:07 -05:00
xserver.ent.in doc: relocate xserver.ent in the package root directory 2011-05-14 11:22:26 -07:00

					X Server

The X server accepts requests from client applications to create windows,
which are (normally rectangular) "virtual screens" that the client program
can draw into.

Windows are then composed on the actual screen by the X server
(or by a separate composite manager) as directed by the window manager,
which usually communicates with the user via graphical controls such as buttons
and draggable titlebars and borders.

For a comprehensive overview of X Server and X Window System, consult the
following article:
http://en.wikipedia.org/wiki/X_server

All questions regarding this software should be directed at the
Xorg mailing list:

        http://lists.freedesktop.org/mailman/listinfo/xorg

Please submit bug reports to the Xorg bugzilla:

        https://bugs.freedesktop.org/enter_bug.cgi?product=xorg

The master development code repository can be found at:

        git://anongit.freedesktop.org/git/xorg/xserver

        http://cgit.freedesktop.org/xorg/xserver

For patch submission instructions, see:

	http://www.x.org/wiki/Development/Documentation/SubmittingPatches

For more information on the git code manager, see:

        http://wiki.x.org/wiki/GitPage