xserver-multidpi/hw
Tomáš Trnka 323869f329 Fix drain_console unregistration
Bug introduced by 9dca441670
xfree86: add a hook to replace the new console handler.

console_handler was not being set, making the server eat up CPU spinning
in WaitForSomething selecting consoleFd over and over again, every time
trying to unregister drain_console without success due to
console_handler being NULL.

Let's just fix the unregistration in xf86SetConsoleHandler() and use that.

But wait, there could be a catch: If some driver replaced the handler using
xf86SetConsoleHandler(), the unregistration in xf86CloseConsole will unregister
that one. I don't understand Xorg well enough to know whether this poses a
problem (could mess up driver deinit somehow or something like that). As it is,
xf86SetConsoleHandler() doesn't offer any way to prevent this (i.e. check which
handler is currently registered).

I had been using it for two days on my machine that previously hit 100% CPU
several times a day. That has now gone away without any new problems appearing.

Signed-off-by: Tomas Trnka <tomastrnka@gmx.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-10-18 09:15:54 +10:00
..
dmx Merge remote-tracking branch 'mattst88/for-keith' 2011-09-21 14:34:27 -07:00
kdrive kdrive: Fix build for opaque InputOption structure. 2011-10-03 11:51:00 -07:00
vfb Use internal temp variable for swap macros 2011-09-21 17:12:04 -04:00
xfree86 Fix drain_console unregistration 2011-10-18 09:15:54 +10:00
xnest Eliminate MAXSCREENS-sized CursorScreenKey array. 2011-09-19 22:53:05 -07:00
xquartz XQuartz: pbproxy: Add missing AM_OBJCFLAGS 2011-10-04 21:40:41 -07:00
xwin Use internal temp variable for swap macros 2011-09-21 17:12:04 -04:00
Makefile.am Catch errors in recursive relink targets 2010-03-22 00:45:57 -05:00