codehenry / xmonad

Automatically exported from code.google.com/p/xmonad
0 stars 0 forks source link

Wrong floating window sizes on multimon setup #414

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I have a dual monitor setup using twinview, left is 1280x1024, right - 
1920x1200.

The windows that should be floating in some exact sizes appear correctly on 4:3 
screen, but have a bad size on the right, 16:10 monitor, having weird borders 
around.

To reproduce, I can open, e.g winecfg on the one or other monitor; see the 
attached image for its appearance.

Running the latest darcs version of xmonad and xmonad-contrib, can reproduce 
with minimal xmonad.hs, the problem doesn't appear when running single monitor.

Original issue reported on code.google.com by ein...@gmail.com on 18 Oct 2010 at 7:16

Attachments:

GoogleCodeExporter commented 8 years ago
Unfloating and then floating the window again sets its size back properly, so 
the bug happens only when the window is first created.

Original comment by ein...@gmail.com on 18 Oct 2010 at 8:33

GoogleCodeExporter commented 8 years ago
Doesn't happens for me with winecfg and a 3 monitor setup (1x 16:10, 2x 4:3)

But I have the same problem with opera when I install it with gtk. Does winecfg 
use gtk? Then it would be a generic problem with gtk and xmonad :/

Original comment by FelixBla...@gmail.com on 18 Oct 2010 at 8:49

GoogleCodeExporter commented 8 years ago
It happens with gcolor2 (gtk), and the same thing happens with the windows 
created by OCaml graphics library (it creates windows by calling X directly, 
without toolkits), but I haven't seen the issues with KDE applications, though 
I don't know any similar adequate applications. 
The afterwards-created floating dialog windows (various preference windows, 
help-abouts etc I just tried looking at) seem to be correct both in KDE and GTK 
applications.

Original comment by ein...@gmail.com on 18 Oct 2010 at 9:14

GoogleCodeExporter commented 8 years ago
I think the problem is that xmonad internally represents window dimensions as 
fractions of screen size, and these are computed from the initial window 
position and size. So, if an application creates a new window at (0,0) and then 
asks the window manager to position it, xmonad computes the size as a fraction 
relative to the screen containing (0,0) and then places the window on whatever 
screen is currently active. If the size of this screen is different, so is the 
size of the placed window.

Original comment by liskni...@gmail.com on 19 Oct 2010 at 8:50

GoogleCodeExporter commented 8 years ago
Yeah that could be possible.

At my problem xmonad sometimes creates a windows which is width > 5000px. My 
total screen size is 4960x1600.
The problem (at me) typ. only occurs with the width, not the height.

Original comment by FelixBla...@gmail.com on 19 Oct 2010 at 8:58