Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Maximizing window on secondary monitor jumps to main monitor and messes up tiling there. #32

Closed
StFS opened this issue Nov 18, 2014 · 7 comments
Labels

Comments

@StFS
Copy link

StFS commented Nov 18, 2014

Just some comments about my experience with multimonitor setup.

I have a huge (32" - 2560x1440) main screen and a very small secondary screen (19" - 1280x1024).

Tiling is only active on my main screen and not on the secondary screen. This is actually fine by me but I'm guessing some people would like to have tiling on both screens. I would like to have a config option that would enable me to choose which monitor tiling is active on and which not. I would even prefer to be able to choose which virtual desktop tiling is enabled on so that I can have one virtual desktop with "normal" floating windows and the rest using tiling (and even some virtual desktops where one monitor is floating but the other one tiling etc.).

The main problem that I'm experiencing though is when I have a window on my secondary monitor and I try to maximize it, it jumps over to the main screen and gets maximized there. Furthermore it messes up the whole tiling of the main monitor.

@StFS
Copy link
Author

StFS commented Nov 18, 2014

Ok, a bit more info on this.

It seems that this is only a problem if the window was originally created on the main monitor. If I click on a window on the secondary monitor, press Alt+F2 (which brings the launcher bar up on my secondary monitor) and type in a name of a program there, the program window starts up on the secondary monitor and there I can maximize it. If I then move it to the primary monitor and maximize it, it gets maximized on the primary monitor but does not participate in tiling (it just gets maximized over the other windows that are tiled).

@faho
Copy link
Collaborator

faho commented Nov 18, 2014

Thanks for your information.

This all ties into #5 - I don't have a multimonitor setup, so all that stuff is basically untested.

I would even prefer to be able to choose which virtual desktop tiling is enabled on so that I can have one virtual desktop with "normal" floating windows and the rest using tiling

This feature actually exists it's just undiscoverable (and I haven't found a good solution for that).
There's a textfield in the config dialog that by default is filled with something like

3:BladeLayout,1:HalfLayout,-8:

That's a configuration string that sets default layouts and tiling state for virtual desktops (in the format desktopnr:layout,desktopnr:layout - a negative desktop number disables tiling by default).

The reason for this is basically that I couldn't find a good way to express that flexibility in a proper UI.

Now, extending this to support monitors should be fairly easy.

The main problem that I'm experiencing though is when I have a window on my secondary monitor and I try to maximize it, it jumps over to the main screen and gets maximized there.

I'll try to look into that, I should have access to a secondary monitor on the weekend.

In case you or someone else decides to take a stab at it: I suspect the issue starts with tiling not being active on the secondary monitor, so maybe movements across monitors aren't detected.

@faho
Copy link
Collaborator

faho commented Nov 27, 2014

Okay, I've tested this now and I've found what causes it:

We never actually change the screen variable in the tile, so it requests the geometry of the screen it was created on, and gets it. I need to check if just checking if the screen changed in movement handling is enough, since it doesn't seem like there is a proper "screenChanged" signal (or more precisely, there is a signal by that name, but the documentation seems to suggest it's for something else). If there really isn't one, that would substantially complicate making certain screens floating and others tiling.

As to why it then doesn't participate in tiling: That's because the current logic is that maximized clients don't. The idea is that maximization (which is a bit hackish, anyway, as we don't get the initial maximization state) is a way to opt out of tiling for a short while.

@faho
Copy link
Collaborator

faho commented Nov 29, 2014

So, that wasn't quite correct - we actually already checked if it switches monitors, but through detecting it on move (which may or may not be worse than just waiting for the screenChanged signal).

What was missing was setting a variable, which meant that we always looked in the wrong layout, which meant we never did anything to that tile. See d65293d. That's in the plasma5 branch, but I'll try to backport it so you can test it.

@faho
Copy link
Collaborator

faho commented Dec 3, 2014

I have now moved this to the multimonitor branch. See 694f034. If you could test it, it'd be great, but I don't want to push this on people before there's at least a way to disable tiling on a screen, since there are still some issues related to multimonitor left.

@faho
Copy link
Collaborator

faho commented Apr 29, 2016

I'm guessing this is fixed in a88c2ff.

@faho faho closed this as completed Apr 29, 2016
@faho faho added the bug label Apr 29, 2016
@piotr-dobrogost
Copy link

I'm observing window jumping to another screen when being maximized.
Could we have this bug reopened and could somebody please confirm that issue with maximization is still present?
Wondering if #130 could help here anyhow?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants