Announcement: Be excellent to each other.


Caravel Forum : DROD Boards : Bugs : Fullscreen DROD is focus-greedy
New Topic New Poll Post Reply
Poster Message
Xindaris
Level: Smitemaster
Avatar
Rank Points: 1017
Registered: 06-13-2015
IP: Logged
icon Fullscreen DROD is focus-greedy (+1)  
In the latest beta for 5.1.1, if DROD is in fullscreen mode and I alt-tab to something else (in Windows), it won't minimize/stay minimized. I'm absolutely certain that it did minimize before. Even if I push the button that minimizes everything and displays the desktop, the instant I open some other program, DROD pops up underneath it. This is rather annoying.

____________________________
109th Skywatcher

Here are some links to Things!
Click here to view the secret text


[Last edited by Xindaris at 11-18-2020 02:24 AM]
11-18-2020 at 02:23 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 4729
Registered: 02-04-2003
IP: Logged
icon Re: Fullscreen DROD is focus-greedy (0)  
Skell, are you aware of any event changes to the code might cause this? I haven't made any changes to window/focus handling.

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.
11-18-2020 at 12:51 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 3500
Registered: 12-28-2004
IP: Logged
icon Re: Fullscreen DROD is focus-greedy (0)  
I only touched full screen/focus related code when doing the changes to stop effects, speech and SFX when out of focus.

Interestingly on my current 5.2 build I can't even enter fullscreen but I wouldn't think about this too much.

____________________________
My website | Facebook | Twitter
11-18-2020 at 01:10 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 3500
Registered: 12-28-2004
IP: Logged
icon Re: Fullscreen DROD is focus-greedy (+1)  
From what I checked the current behavior is consistent with Steam version, so it seems it's SDL2 related.

I am a little reluctant to mess with full screen because it could easily break things on other platforms and I have no way of testing it, and there doesn't seem to be much documentation on this specific issue either.

I see a way out of this though. We can detect when focus is lost and then force-minimize the game window, though it makes it slower to come back to the game, so I think it'll be best to hide this behind an option in the settings.

____________________________
My website | Facebook | Twitter
11-18-2020 at 08:15 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
Xindaris
Level: Smitemaster
Avatar
Rank Points: 1017
Registered: 06-13-2015
IP: Logged
icon Re: Fullscreen DROD is focus-greedy (0)  
I'd be fine with that. The main reason it came up for me is that my laptop's screen just isn't tall enough for windowed DROD, so to see all of the game it has to be in fullscreen--but then I sometimes want to minimize to go do something else. (This wouldn't be a problem if DROD's window could just be resized like most programs' windows, but it's been my general understanding that this is Very Impossible, for Reasons)

____________________________
109th Skywatcher

Here are some links to Things!
Click here to view the secret text


[Last edited by Xindaris at 11-18-2020 10:03 PM]
11-18-2020 at 10:03 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 3500
Registered: 12-28-2004
IP: Logged
icon Re: Fullscreen DROD is focus-greedy (+5)  
PR

It kind of became a feature request at this point but, here are the changes:
1. Added new ini option FullScreenMode which supports three values: 0=borderless (it works as it did so far), 1=fake borderless (does not have the problem with window being always visible but may have other issues, like task bar appearing on top of the game sometimes), 2=legacy fullscreen (the one that changes resolution, will likely not work on Xindaris's machine since it does not support that resolution.
2. Added new INI option FullScreenMinimize which, when set to 1, automatically minimizes the game window when you alt tab while in full screen. It fixes the problem but returning to the game takes an additional second when it recalculates things.
3. Added new INIT option AllowWindowResizing which just enables resizing the game window. Keep in mind window size is not saved (just to allow to easily reset it to original size by restarting the game), but it should help cases like Xindaris where their resolution is slightly too small. The game scales in the window proportionally, always displaying the whole game.

____________________________
My website | Facebook | Twitter
11-19-2020 at 09:22 AM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
Xindaris
Level: Smitemaster
Avatar
Rank Points: 1017
Registered: 06-13-2015
IP: Logged
icon Re: Fullscreen DROD is focus-greedy (0)  
It's hard to overstate my gratitude for that, especially #3. Sometimes I like to watch some video in another window while building puzzles, and being able to do that on the laptop would be excellent. Thank you!

____________________________
109th Skywatcher

Here are some links to Things!
Click here to view the secret text

11-19-2020 at 04:17 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Xindaris
Level: Smitemaster
Avatar
Rank Points: 1017
Registered: 06-13-2015
IP: Logged
icon Re: Fullscreen DROD is focus-greedy (+1)  
Once I finally figured out how to set them ingame, (since I don't seem to have any drod.ini file? Maybe an artifact of them being originally installed from the GOG installers), both FullScreenMinimize=1 and AllowWindowResizing=1 work perfectly as far as I can tell in both DROD and RPG. I think it requires setting them ingame and then restarting the game to take effect (which I assume is normal).

____________________________
109th Skywatcher

Here are some links to Things!
Click here to view the secret text


[Last edited by Xindaris at 11-22-2020 04:36 AM]
11-22-2020 at 04:35 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Bugs : Fullscreen DROD is focus-greedy
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.