public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
* [PATCH] Fix command line arguments for multiple monitors
@ 2012-04-14 15:29 Jörg Mensmann
  2012-04-17 10:02 ` Jon TURNEY
  0 siblings, 1 reply; 5+ messages in thread
From: Jörg Mensmann @ 2012-04-14 15:29 UTC (permalink / raw)
  To: cygwin-xfree

[-- Attachment #1: Type: text/plain, Size: 179 bytes --]

Hi,

placing the X server on a specific monitor using something like 
"-screen 0 @2" is broken since November. The attached patch restores the
old behaviour.

ciao
  Jörg

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: xwin-multi-monitor-fix.patch --]
[-- Type: text/x-patch, Size: 1090 bytes --]

[PATCH] hw/xwin: Fix command line arguments for multiple monitors.

Moving Xwin to a certain monitor using "-screen 0 @2" would fail,
printing "ddxProcessArgument - screen - Querying monitors failed".

This happened since commit 3ead1d810b0e157078db39712e02ea6dc85216d8,
because EnumDisplayMonitor() returns FALSE if its callback function
returns FALSE (which is not clearly documented), and QueryMonitor()
would then also return FALSE.

Moving back to the old behaviour, where the return value of
EnumDisplayMonitors() is ignored.
---
 hw/xwin/winmonitors.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/hw/xwin/winmonitors.c b/hw/xwin/winmonitors.c
index 26e20b7..7baa3a1 100644
--- a/hw/xwin/winmonitors.c
+++ b/hw/xwin/winmonitors.c
@@ -63,6 +63,7 @@ QueryMonitor(int index, struct GetMonitorInfoData *data)
     data->requestedMonitor = index;
 
     /* query information */
-    return EnumDisplayMonitors(NULL, NULL, getMonitorInfo, (LPARAM) data);
+    EnumDisplayMonitors(NULL, NULL, getMonitorInfo, (LPARAM) data);
+
+    return TRUE;
 }
-- 
1.7.9



[-- Attachment #3: Type: text/plain, Size: 223 bytes --]

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-04-23 12:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-14 15:29 [PATCH] Fix command line arguments for multiple monitors Jörg Mensmann
2012-04-17 10:02 ` Jon TURNEY
2012-04-17 20:09   ` Jörg Mensmann
2012-04-18 18:49     ` Jörg Mensmann
2012-04-23 12:22       ` Jon TURNEY

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).