How to force every single program and every single dialog to open on the right screen

Red Squirrel

No Lifer
May 24, 2003
70,166
13,573
126
www.anyf.ca
There's got to be a way to do this. How do I make it so that when I open a program, it actually opens on the screen it was invoked from? Also how do I make it so when a program opens a dialog, that dialog actually opens over the application, and not on some other screen? It seems no OS can figure out how to do this properly, even Windows is terrible at it. Why is it so hard?

I'm looking at switching to using Code Blocks because Kate has too many bugs that arn't fixed in my distro due to the package manager being too behind but Code Blocks has a lot of dialogs, such as search, open etc and they all end up all over the place, it's super frustrating and unusable.

I was googling and found some Compiz settings you can add that suposedly fix that, so I installed the Compiz setting manager and Compiz, but it does not seem to do anything. I even makde a KDE rule to force ALL windows, of ALL types to the main monitor, and while it works for some, for some it does not. I found a thread on the Code Blocks forum about it being a problem but it was from 2005 so it's probably been fixed but clearly still doing it. I found a setting in the program about multi monitors but that does nothing either. No matter what, certain dialogs keep ending up on the left monitor instead of the centre where I'm actually working. Does not matter what I do. The "new / project" dialog is one of them, but there are a lot of others too.

This issue has been the bane of my existence since I ever started using multi monitors, I'm dumbfounded that it has not been fixed yet in any OS. It is a huge slap in the face when you are working in a program and a dialog that you just opened ends up all the way 2 monitors down.
 
Last edited:

mv2devnull

Golden Member
Apr 13, 2010
1,526
160
106
That is not an OS issue. All the GUI crap is on top of OS and optional, not in it.

Window Managers do what they can (if they bother), but different applications use different GUI frameworks with varying co-operativity and some even dare to dictate how their dialogs must pop up rather than let the manager to do Wise Things.

How about OS X? Does Apple allow the application developers to disobey or do they enforce the One Right Way?
 

Red Squirrel

No Lifer
May 24, 2003
70,166
13,573
126
www.anyf.ca
Hmm sucks so there's really no real way of stopping it? What about somehow making the application think there is only one monitor, and it's the one it's in? Like some kind of graphical sandbox where the app can't touch anything outside of it.

I'm even wondering if separate X sessions could work, but those cause all sorts of other weird issues, I tried it before. Lot of programs like Firefox also wont let you have two windows open in separate X sessions.

Idealy what would be perfect is centre monitor as it's own X session and then the two side ones as a single "dual monitor" session. I had that setup with Synergy and a separate PC before but it had weird issues with mouse cursor getting really choppy when there was anything graphically intense like JS effects in web pagesgoing on, which I don't understand why as the monitors are still physically connected, so it's not like a remote session. I tend to do all my work on centre, the side monitors are to monitor stuff or issue commands on terminals. So I tend to have a bunch of terminal windows on them and web pages if I'm monitoring something.
 

Red Squirrel

No Lifer
May 24, 2003
70,166
13,573
126
www.anyf.ca
I learned about i3-wm while doing some more research, I tried it, but all the fixes I worked hard to do so I don't get screen tearing end up happening in that, and not sure if I'd be able to get used to it as it changes a lot of stuff, like not having a start menu or windows you can just drag around, but it is rather interesting nonetheless, and actually DID work. Codeblocks which I'm trying to switch to for coding so far is the worst offender I've found when it comes to dialog placement, it keeps insisting on putting certain ones on the first monitor no matter what. There is an update for that, but Mint repositories are ridiculously far behind and I've been unsuccessful in trying to get a newer version installed through other means. Everything just breaks. It is frustrating beyond explanation when you are trying to use a program and it's popping stuff left and right instead of where you're actually working.

i3 got me thinking though, is there not some kind of window manager that just treats each monitor as a separate "container" where stuff from one cannot go in the other, at all? I would lose the ability to drag windows from one to the other, but I'm willing to sacrifice that. I typically don't move stuff around much anyway.

Another thing I'm starting to consider is to screw having 3 monitors and just drive the two side monitors with a Raspberry PI or something, and use synergy to control the mouse/keyboard. Only downside to that is when I did have a similar setup the mouse would be laggy during anything remotely graphical like javascript mouse over effects.

I can't be the only person that uses Linux and multi monitor, there's got to be some kind of solution to this issue.