public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
From: Lukas Haase <lukashaase@gmx.at>
To: cygwin-xfree@cygwin.com
Subject: Re: XWin ignores all parameters related to multiple monitors
Date: Tue, 06 May 2014 21:54:00 -0000	[thread overview]
Message-ID: <lkblmh$fui$1@ger.gmane.org> (raw)
In-Reply-To: <5367EE90.4000205@dronecode.org.uk>

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

Hi Jon,

Thanks for helping!

On 2014-05-05 13:03, Jon TURNEY wrote:
> On 04/05/2014 06:56, Lukas Haase wrote:
>> I use Cygwin/X to display a CAD application on my Windows cient. For
>> some reason new windows always open on the secondary display and I
>> always need to manually drag them to my primary display. That's sooo
>> annoying (since UNIX applications tend to open new windows on every
>> action).
> 
> I'm assuming that your secondary display is to the left of your primary
> display.

Yes.
Secondary: builtin laptop display (on left)
Primary: main monitor (on right)

If I do "Identify", the laptop display is identified as "1" and the main
monitor as "2".

> I think that it's a bug that these windows are appearing at the
> top-left, rather than on the primary display, in that we don't
> distinguish well enough between "the application asked us to place the
> window at 0x0" and "the application didn't specify where to put the window"
> 
> It would help if you could give the name of this application, and can
> you install 'xprop', and show the output you get from running that, then
> clicking on one of the window which gets placed incorrectly.

Sure.

It's Cadence Virtuoso/ADE.

The xprop output is:

_WINDOWSWM_NATIVE_HWND(INTEGER) = 77728452
WM_HINTS(WM_HINTS):
		Client accepts input or input focus: True
		Initial state is Normal State.
		bitmap id # to use for icon: 0x200178
		bitmap id # of mask for icon: 0x200179
		window id # of group leader: 0x200001
_NET_WM_ICON(CARDINAL) = 	Icon (50 x 50):
[...]


_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 2097527
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_USER_TIME(CARDINAL) = 744838078
_NET_WM_USER_TIME_WINDOW(WINDOW): window id # 0x200176
WM_CLIENT_LEADER(WINDOW): window id # 0x200001
_NET_WM_PID(CARDINAL) = 24636
WM_LOCALE_NAME(STRING) = "C"
WM_CLIENT_MACHINE(STRING) = "corn"
WM_NORMAL_HINTS(WM_SIZE_HINTS):
		program specified location: 0, 0
		program specified minimum size: 100 by 100
		program specified maximum size: 3820 by 2500
		window gravity: NorthWest
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS,
_NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_CLASS(STRING) = "Qt-subapplication", "Virtuoso"
WM_ICON_NAME(STRING) = "Virtuoso® Schematic Editor L Editing: project
sch1 schematic on corn"
_NET_WM_ICON_NAME(UTF8_STRING) = "Virtuoso® Schematic Editor L Editing:
project sch1 schematic on corn"
WM_NAME(STRING) = "Virtuoso® Schematic Editor L Editing: project sch1
schematic on corn"
_NET_WM_NAME(UTF8_STRING) = "Virtuoso® Schematic Editor L Editing:
project sch1 schematic on corn"

>> To avoid this, I want to disable the second monitor (and *only* use the
>> primary). But whatever I do, XWin seems to ignore whatever I supply. For
>> example, I start
>>
>> /usr/bin/startxwin.exe -- -nomultiplemonitors
>> /usr/bin/startxwin.exe -- -screen 0 @1 -nomultiplemonitors
>> /usr/bin/startxwin.exe -- -screen 0 @1
>> /usr/bin/startxwin.exe -- -mwextwm -screen 0 @1 -nomultiplemonitors
>>
>> and so on.
>> Nothing works - everything as before. When I select "Hide Root Window"
>> from the tray icon I see that the root window indeed covers both
>> monitors.
> 
> This is not how it behaves for me.  Using -nomultiplemontiors, or an
> explicit -screen setting shows an appropriately sized root window when
> turning off "Hide Root Window". (Although this is not terribly useful as
> you can move the Windows windows out of this area, which causes their
> contents to not be drawn)

You are right. Further research shows me that my arguments never showed
up in XWin.0.log. Maybe I there's a different bug here?

I call XWin like this:

C:\cygwin\bin\run.exe /usr/bin/bash.exe -l -c /usr/bin/startxwin.exe --
-nomultimonitors

And this appears in XWin.0.log:

XWin was started with the following command line:

X :0 -multiwindow


However, if I directly start the XServer,
  XWin.exe -screen 0 @1 -multiwindow -nomultimonitors
it works:

XWin was started with the following command line:

XWin -screen 0 @1 -multiwindow -nomultimonitors

Why does startxwin.exe does not pass the parameters to the XServer.


However, unfortunately this does not change anything: You are right that
when I uncheck "Hide Root window", the black root window *only* covers
the primary monitor. That's good.

But windows are *still* opened at the second monitor!

What's even worse (and pretty astonishing to me): All X windows are
*only* displayed correctly on the *secondary* display with the command
line above. On the primary display, the window frames are shown but the
windows are not drawn (they are transparent) and they do not accept
mouse/keyboard input.

So it's completely the oppisite as it is intended ...

> Can you check if the screen dimensions reported by xdpyinfo match those
> you are requesting, and attach your /var/log/xwin/XWin.0.log?

Hmm, I have here:
[...]
default screen number:    0
number of screens:    1

screen #0:
  dimensions:    1920x1080 pixels (508x286 millimeters)
  resolution:    96x96 dots per inch
  depths (7):    24, 1, 4, 8, 15, 16, 32
  root window id:    0x6b
  depth of root window:    24 planes
  number of colormaps:    minimum 1, maximum 1
  default colormap:    0x20
  default number of colormap cells:    256
  preallocated pixels:    black 0, white 16777215
  options:    backing-store WHEN MAPPED, save-unders NO
  largest cursor:    32x32
  current input event mask:    0x4a0007
    KeyPressMask             KeyReleaseMask           ButtonPressMask

    StructureNotifyMask      SubstructureNotifyMask   PropertyChangeMask

  number of visuals:    21
  default visual id:  0x21
  visual:
    visual id:    0x21
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
[...]

I think that's fine.

XWin.0.log with the command line from above is attached.

> Separately, it's possible that we should do something better with the
> combination of -nomultiplemontors and -multiwindow, but it's not quite
> clear to me what.  (See discussion [1])

I would reaaaally appreciate that.
Unfortunately I am not really an X expert.

What bothers me a little bit is that windows are displayed on a screen
which should not even exist. (besides the problem reported above that
the windows are not even drawn on the intended screen).

Thanks
Luke




[-- Attachment #2: XWin.0.log --]
[-- Type: text/plain, Size: 5626 bytes --]

Welcome to the XWin X Server
Vendor: The Cygwin/X Project
Release: 1.15.1.0
OS: CYGWIN_NT-6.2-WOW64 thinktank 1.7.29(0.272/5/3) 2014-04-07 13:44 i686
OS: Windows 8  [Windows NT 6.2 build 9200] (WoW64)
Package: version 1.15.1-1 built 2014-04-16

XWin was started with the following command line:

XWin -screen 0 @1 -multiwindow -nomultimonitors 

ddxProcessArgument - Initializing default screens
winInitializeScreenDefaults - primary monitor w 1920 h 1080
winInitializeScreenDefaults - native DPI x 96 y 96
winInitializeScreens - 1
winInitializeScreen - 0
ddxProcessArgument - screen - Found Valid ``@Monitor'' = 1 arg
_XSERVTransmkdir: Mode of /tmp/.X11-unix should be set to 1777
_XSERVTransmkdir: this may cause subsequent errors
[745929.703] Initializing built-in extension Generic Event Extension
[745929.703] Initializing built-in extension SHAPE
[745929.703] Initializing built-in extension MIT-SHM
[745929.703] Initializing built-in extension XInputExtension
[745929.703] Initializing built-in extension XTEST
[745929.703] Initializing built-in extension BIG-REQUESTS
[745929.703] Initializing built-in extension SYNC
[745929.703] Initializing built-in extension XKEYBOARD
[745929.703] Initializing built-in extension XC-MISC
[745929.703] Initializing built-in extension XINERAMA
[745929.703] Initializing built-in extension XFIXES
[745929.703] Initializing built-in extension XFree86-Bigfont
[745929.703] Initializing built-in extension RENDER
[745929.703] Initializing built-in extension RANDR
[745929.703] Initializing built-in extension COMPOSITE
[745929.703] Initializing built-in extension DAMAGE
[745929.703] Initializing built-in extension MIT-SCREEN-SAVER
[745929.703] Initializing built-in extension DOUBLE-BUFFER
[745929.703] Initializing built-in extension RECORD
[745929.703] Initializing built-in extension DPMS
[745929.703] Initializing built-in extension Present
[745929.703] Initializing built-in extension X-Resource
[745929.703] Initializing built-in extension GLX
[745929.703] (II) xorg.conf is not supported
[745929.703] (II) See http://x.cygwin.com/docs/faq/cygwin-x-faq.html for more information
[745929.703] LoadPreferences: /home/niki/.XWinrc not found
[745929.703] LoadPreferences: Loading /etc/X11/system.XWinrc
[745929.703] LoadPreferences: Done parsing the configuration file...
[745929.718] winDetectSupportedEngines - DirectDraw4 installed, allowing ShadowDDNL
[745929.718] winDetectSupportedEngines - Returning, supported engines 00000015
[745929.718] winSetEngine - Multi Window or Rootless => ShadowGDI
[745929.718] winScreenInit - Using Windows display depth of 32 bits per pixel
[745929.812] winAllocateFBShadowGDI - Creating DIB with width: 1920 height: 1080 depth: 32
[745929.812] winFinishScreenInitFB - Masks: 00ff0000 0000ff00 000000ff
[745929.812] winInitVisualsShadowGDI - Masks 00ff0000 0000ff00 000000ff BPRGB 8 d 24 bpp 32
[745929.812] winInitMultiWindowWM - Calling pthread_mutex_lock ()
[745929.812] winMultiWindowXMsgProc - Calling pthread_mutex_lock ()
[745929.812] MIT-SHM extension disabled due to lack of kernel support
[745929.812] XFree86-Bigfont extension local-client optimization disabled due to lack of shared memory support in the kernel
[745929.828] glWinSelectGLimplementation: Loaded 'cygnativeGLthunk.dll'
[745929.968] GL_VERSION:     4.0.0 - Build 9.17.10.2875
[745929.968] GL_VENDOR:      Intel
[745929.968] GL_RENDERER:    Intel(R) HD Graphics 4000
[745929.968] (II) AIGLX: enabled GLX_SGI_make_current_read
[745929.968] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer
[745929.968] (II) AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control
[745929.968] (II) AIGLX: enabled GLX_SGIX_pbuffer
[745929.968] (II) AIGLX: enabled GLX_ARB_multisample and GLX_SGIS_multisample
[745929.968] (II) 66 pixel formats reported by wglGetPixelFormatAttribivARB
[745929.968] (II) AIGLX: Set GLX version to 1.4
[745929.984] (II) 21 fbConfigs
[745929.984] (II) GLX: Initialized Win32 native WGL GL provider for screen 0
[745930.109] winPointerWarpCursor - Discarding first warp: 960 540
[745930.109] (--) 5 mouse buttons found
[745930.109] (--) Setting autorepeat to delay=500, rate=31
[745930.109] (--) Windows keyboard layout: "00000409" (00000409) "US", type 4
[745930.109] (--) Found matching XKB configuration "English (USA)"
[745930.109] (--) Model = "pc105" Layout = "us" Variant = "none" Options = "none"
[745930.109] Rules = "base" Model = "pc105" Layout = "us" Variant = "none" Options = "none"
[745930.109] winBlockHandler - pthread_mutex_unlock()
[745930.109] winInitMultiWindowWM - pthread_mutex_lock () returned.
[745930.109] winInitMultiWindowWM - pthread_mutex_unlock () returned.
[745930.109] winInitMultiWindowWM - DISPLAY=:0.0
[745930.109] winMultiWindowXMsgProc - pthread_mutex_lock () returned.
[745930.109] winMultiWindowXMsgProc - pthread_mutex_unlock () returned.
[745930.109] winMultiWindowXMsgProc - DISPLAY=:0.0
[745930.109] winProcEstablishConnection - winInitClipboard returned.
[745930.109] winInitMultiWindowWM - XOpenDisplay () returned and successfully opened the display.
[745930.109] winClipboardThreadProc - DISPLAY=:0.0
[745930.109] winMultiWindowXMsgProc - XOpenDisplay () returned and successfully opened the display.
[745930.109] winClipboardProc - XOpenDisplay () returned and successfully opened the display.
[745938.484] OS has icon alpha channel support: yes
[745948.156] executing 'xterm', pid 7992
[745948.250] (pid 7992 stderr) Warning: Missing charsets in String to FontSet conversion
[745980.343] executing 'xterm', pid 13548
[745980.453] (pid 13548 stderr) Warning: Missing charsets in String to FontSet conversion

[-- 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:[~2014-05-06 21:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-04  6:06 Lukas Haase
2014-05-05 20:03 ` Jon TURNEY
2014-05-06 21:54   ` Lukas Haase [this message]
2014-05-08 12:15     ` Jon TURNEY
2014-05-08 23:28       ` Lukas Haase
2014-05-09 10:15         ` Jon TURNEY
2014-05-09 20:26           ` Lukas Haase
2014-06-19 21:38             ` 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='lkblmh$fui$1@ger.gmane.org' \
    --to=lukashaase@gmx.at \
    --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).