public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
From: "Jörg Mensmann" <joerg_ml@bitplanet.de>
To: cygwin-xfree@cygwin.com
Subject: [PATCH] Fix command line arguments for multiple monitors
Date: Sat, 14 Apr 2012 15:29:00 -0000	[thread overview]
Message-ID: <m3fwc6z61c.fsf@msgid.bitplanet.de> (raw)

[-- 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/

             reply	other threads:[~2012-04-14 15:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-14 15:29 Jörg Mensmann [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3fwc6z61c.fsf@msgid.bitplanet.de \
    --to=joerg_ml@bitplanet.de \
    --cc=cygwin-xfree@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).