Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiheaded setup treated as one big screen #37

Open
Diegovsky opened this issue Feb 29, 2020 · 6 comments
Open

Multiheaded setup treated as one big screen #37

Diegovsky opened this issue Feb 29, 2020 · 6 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Diegovsky
Copy link

First off, this window manager is great. Very responsive, lightweight and easy to configure (props to the dev making the config file look a lot like i3).

But here is the issue I'm currently having: my current setup uses two monitors (a 1920x1080 and 1360x768) and when any tiled window is opened, it is streched between both of my monitors, behaving like one big screen.

How to reproduce: Use any xrandr multiheaded display setup.

@aesophor
Copy link
Owner

aesophor commented Mar 1, 2020

Thanks you so much for trying it out!

Currently this window manager still doesn't support multi-monitors yet, but I'll implement this in the next release. This could really take some time though, as I've read the documentation of i3wm and herbstluftwm and it turns out implementing this isn't an easy task.

https://i3wm.org/docs/userguide.html#multi_monitor
https://herbstluftwm.org/tutorial.html#monitors
https://github.com/herbstluftwm/herbstluftwm/blob/master/src/monitor.cpp

@aesophor aesophor added enhancement New feature or request help wanted Extra attention is needed labels Mar 1, 2020
@Diegovsky
Copy link
Author

Thanks for the response! That's fine, I'm a patient guy. Really looking forward to that, my hopes are really high for this wm.

Cheers, Diego.

@Sweets
Copy link

Sweets commented Apr 20, 2020

Thanks you so much for trying it out!

Currently this window manager still doesn't support multi-monitors yet, but I'll implement this in the next release. This could really take some time though, as I've read the documentation of i3wm and herbstluftwm and it turns out implementing this isn't an easy task.

Not necessarily true. An easy way to handle monitor outputs is to do so notionally, in that they don't exist as objects within the window manager, but rather, are selected by their output name (e.g. LVDS-0, VGA-1, etc), and to calculate for pixels on that given monitor, you offset your calculations by the X and Y position in the monitor (see: geometry strings, e.g. 1366x768+0+0, the +0+0 is your X and Y offsets), but still do the positioning relative to the total size of the root window itself.

If you'd like some references for multihead, here's querying displays and storing their information from my own wm.

https://github.com/Sweets/custard/blob/master/src/xcb/xrandr.c
https://github.com/Sweets/custard/blob/master/src/wm/monitor.c

@aesophor
Copy link
Owner

@Sweets Thanks very much! I'll take a look at your code!

@Sweets
Copy link

Sweets commented Apr 21, 2020

No problem. Just keep in mind that the root window is the closest whole rectangle of the summation of each individual display's rectangle. So if you've got two displays, the left being 1366x768 and the right being 1920x1080 (with no displacement between the two), then the root window's size is 3286x1080. Then to put windows onto the second display on the right (the 1080p display) then your (0,0) for the second display is actually (1366,0) in the root.

Hopefully I explained everything in a way that made sense. If not, have an image.

image

@aesophor
Copy link
Owner

@Sweets Everything is explained very clearly and makes sense to me! Thank you again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants