Go to file
Jon TURNEY 94d433c8cb hw/xwin: Fix clipboard thread restart
It seems that the clipboard thread restart mechanism has been broken for a
while, which can be demonstrated using XDMCP with KDM (e.g. to a Kubutunu 12.04
host)

KDM kills all attached clients, including the clipboard integration client,
which restarts, but then exits on WM_QUIT.

Using PostQuitMessage() in WM_DESTROY is unhelpful, as we may not actually be
quitting the thread, if we just destroyed the window because the clipboard
thread is about to retry, because he WM_QUIT message sticks around, and is
noticed the next time we look at the window message queue and confuses us into
thinking we need to quit.

Sending a WM_DESTROY is apparently never correct anyhow, see [1]

So:

1/ Use DestroyWindow() to destroy the clipboard messaging window when cleaning
up for retry or exit in winClipboardProc (the clipboard thread main proc)

2/ Send a special WM_WM_QUIT message in winClipboardWindowDestroy() from the X
server thread when the X server is resetting.

3/ When processing that WM_WM_QUIT message in the clipboard thread, cause the
clipboard window to PostQuitMessage(), which causes the clipboard thread to
exit.

[1] http://blogs.msdn.com/b/oldnewthing/archive/2011/09/26/10216420.aspx

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-11-09 14:22:51 +00:00
composite composite: Wrap GetSpans 2014-10-28 11:29:48 -07:00
config config: Replace OdevAttributes linked list with struct 2014-07-17 17:10:48 -07:00
damageext Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
dbe Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
dix dix: Untwist transformAbsolute logic, eliminate uninitialized value warnings 2014-10-28 20:56:37 -07:00
doc os: Remove deprecated malloc/free wrappers 2014-07-29 09:51:50 -04:00
dri3 dri3: Don't enable the DRI3 extension unless some screen supports it 2014-08-17 14:37:44 -07:00
exa dix: Always store GC client clip as a region (v2) 2014-10-27 15:46:05 -04:00
fb fb: Fix Bresenham algorithms for commonly used small segments. 2014-10-27 16:35:56 -07:00
glamor glamor: Free converted bits in _glamor_upload_bits_to_pixmap_texture fast path 2014-10-26 17:00:17 -07:00
glx Allocate enough room for both reset & flags attributes 2014-10-23 17:31:59 -07:00
hw hw/xwin: Fix clipboard thread restart 2014-11-09 14:22:51 +00:00
include dix: Retype and repack GC 2014-10-27 13:01:43 -07:00
m4 xorg-tls: fix warning, replace AC_TRY_COMPILE with AC_COMPILE_IFELSE 2014-01-22 11:18:42 -08:00
man os: Don't listen to 'tcp' by default. Add '-listen' option. [v2] 2014-09-22 13:52:20 -07:00
mi dix: Always store GC client clip as a region (v2) 2014-10-27 15:46:05 -04:00
miext rootless: remove redundant RootlessShapedWindowIn 2014-10-08 16:01:49 +02:00
os os: Eliminate uninitialized value warnings from access.c 2014-10-28 11:25:56 -07:00
present Fix present_notify to return right away when querying current or past msc. 2014-10-30 14:37:15 -07:00
pseudoramiX pseudoramiX: Add _X_ATTRIBUTE_PRINTF attributes to debug functions. 2014-01-27 11:38:34 -08:00
randr randr: Fix logic in RRPointerToNearestCrtc 2014-07-30 14:40:17 -07:00
record Clean up a few function prototypes to not place formals in /**/ 2014-01-12 10:24:12 -08:00
render render: Always store client clip as a region 2014-10-23 14:35:49 -07:00
test Use unique display name for each xi2 test program [v3] 2014-10-09 14:15:45 +02:00
Xext xv: Add missing gcstruct.h include 2014-10-31 07:00:01 -07:00
xfixes dix: Always store GC client clip as a region (v2) 2014-10-27 15:46:05 -04:00
Xi Xi: block SIGIOs while copying device classes around 2014-05-23 11:08:17 +10:00
xkb xkb: Initialize 'bad' Atom in _XkbSetNamesCheck 2014-10-28 11:26:23 -07:00
.dir-locals.el Add .dir-locals.el 2013-08-17 12:17:36 +02:00
.gitignore .gitignore: Add new autotools file 'test-driver' 2014-04-21 13:41:42 -07:00
autogen.sh autogen.sh: Honor NOCONFIGURE=1 2012-10-19 13:12:33 +10:00
configure.ac Update to version 1.16.99.901 2014-10-28 21:32:24 -07:00
COPYING modesetting: Merge modesetting's COPYING into the xserver's. 2014-09-15 12:46: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 DIST_SUBDIRS needs to include glamor, even if it isn't built 2014-02-13 15:25:56 -08:00
manpages.am Xorg: Add a suid root wrapper 2014-03-12 08:50:05 +01:00
README
xorg-server.m4 macros: clarify documentation 2012-11-05 13:24:57 -06: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