It is currently Mon Jun 18, 2018 6:10 am

Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: [Linux multi-monitors] Keep starting on the wrong screen
PostPosted: Thu Sep 10, 2015 4:34 pm 

Joined: Thu Sep 10, 2015 4:21 pm
Posts: 3
( Running debian 8 with cinnamon. GoG version )

I happen to have two monitors on my linux machine, the small one configured as a secondary monitor and on the left of the main one, extending the desktop.

For some reason, tower of guns keep wanting to start on that one, no matter where it was actually started but it also keep jumping back there if I fiddle with the options in-game.
( I'm guessing it's simply getting back near te top left corner from Xorg point of view )

It's more an annoyance than anything else ( And it look like a bad sign before trying fullscreen ), but it there something to be done beyond disabling that monitor before launching the game?

 Post subject: Re: [Linux multi-monitors] Keep starting on the wrong screen
PostPosted: Tue Sep 15, 2015 5:50 am 

Joined: Sat Mar 15, 2014 2:10 pm
Posts: 18
Hello FrenchGeek,

You are right, Tower Of Guns always seems to initialize at position 0,0. Now I am not sure if this strictly an SDL behavior or a rule forced by UDK (as it does the same thing on Windows).

There are a few things you can do but I am not sure which will work for you and which ones will interrupt your regular workflow.

1) A Window rule
I am only a KDE user so I cannot tell you if or how this works in Cinnamon. But if you use Compiz as a Window Manager, I think this is possible. If you make a window or even application specific rule you should be able to tell this window/application to launch on a specified monitor. Again, I am not 100% certain how to do this outside of KDE so I am not certain if you can do this.

2) Monitor configuration
This is a little bit of a hacker approach but it should work in theory, depending on how you configure your dual-monitor setup (nvidia-settings, xrandr, xorg.conf, integrated application, etc). So assuming you have a 1024x768 and a 1920x1080 monitor, the first one probably sits at 0,0 while the second is probably configured as "right of" the first.
But you should be able to configure them with absolute coordinates. So make the 1920x1080 your primary monitor and set the second one with absolute position to "-1024,0" (or whatever its proper width is). This way, the 0,0 coordinates (where ToG initializes) should be on your large screen.

3) Separate X-Session
If everything fails, instead of disabling your secondary monitor, I would rather recommend you to launch Tower Of Guns on a secondary Xorg Session. There is tools and tutorials out there explaining this in detail or help you to automate this process for whatever application you wish to use it.
The advantages of this solution are
- No need to disable your monitor which may probably mess with your Desktop configuration
- If your Desktop uses effects such as blur and transparency, Tower Of Guns will not suffer from this performance impact.
- You can switch between the game and your normal Desktop as you'd usually switch virtual terminals

I hope one of these suggestions are helpful to you. I was almost certain that SDL had some environment variable sin the past where you could modify the window position but as it looks they have been removed between SDL1.2.x and SDL2...

 Post subject: Re: [Linux multi-monitors] Keep starting on the wrong screen
PostPosted: Tue Sep 15, 2015 10:35 am 

Joined: Thu Sep 10, 2015 4:21 pm
Posts: 3
The window rule should be the easiest way to do it for me ( the monitors are configured the same way as their physical setup, and changing it would become confusing and annoying fast )...

I'll search for a bit for it ( devilspie is available on debian, but there may be simpler way to do it ). The annoying part being the game moving around after playing with the options ( and once during its black window phase ), which would mean a script to check up where the game window is periodically...

The separate X session seem a bit too complex an answer for me...

But lazy as I am, I think I will simply keep manualy moving the window to the primary monitor ( one right click away on the taskbar ) once the game menu is displayed. I just have to make sure to always have an app to alt-tab to if needed...

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Theme designed by © 2008
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All times are UTC - 5 hours