How I achieved fullscreen windowed mode with spring - Page 2

How I achieved fullscreen windowed mode with spring

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: How I achieved fullscreen windowed mode with spring

Post by Forboding Angel »

abma, make default stick it in the top left
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: How I achieved fullscreen windowed mode with spring

Post by knorke »

I think not being able to (accidently) move the window is one of the aims of this.
Though being able to do rightclick on program in taskbar -> move would be nice.

First tried with (defaul) like this:
XResolution=0
YResolution=0
seems to work. (looks just like normal fullscreen)

Then tried:
XResolution=1024
YResolution=768
and the window was still completly on screen.
Try setting WindowPosX and WindowPosY?

hm, on alt tab it seems to mess up unit icons:
Image
/edit
Tried 3 times with WindowBorderless=1 and 3 times with WindowBorderless=0
only happend with WindowBorderless=1
water gets graphic errors too.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: How I achieved fullscreen windowed mode with spring

Post by FLOZi »

abma wrote:you've to edit springsettings.cfg and set
WindowPosX
WindowPosY
+ WindowState=0 (?)

currently there is no possibility to move the window, if your window-manager cant do it.

in linux you can hold alt + left mouse + move it arround...
Every time I set them, save, and restart they are some different value. :(


Edit; In fact, every time I run spring, they are changed to something else.
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: How I achieved fullscreen windowed mode with spring

Post by jK »

Blame crappy X11 protocol. It's a pain in the ass.
In the X11-world windows don't have any border. That's why you need stupid overloaded `Window Decorators` in X11, which do nothing else than creating a SECOND WINDOW AROUND YOUR WINDOW! and drawing the so called window frame in it (titlebar, close buttons, ...).
Now the problem is obvious: cause the frame doesn't really belong to the window, there is no X11-way to get the coordinations of that frame window. Means when you create a window, save the coords of it and then recreate a window with those saved coords, the windows will shift to bottom right!

Now after ages of wasted hours with google, there is no damn easy, fail-safe way to get the coords of the frame window. Sure I wrote a few lines for Spring that worked for me, but they don't have to work for others nor do they still have to work after a Window Decorator upgrade/switch.

X11 burn in hell!
And its devs, because they are too ignorant to support wayland!
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: How I achieved fullscreen windowed mode with spring

Post by Forboding Angel »

:cry:

Image
MadrMan
Posts: 12
Joined: 17 Jan 2009, 20:13

Re: How I achieved fullscreen windowed mode with spring

Post by MadrMan »

Knorke:
You shouldn't be getting graphical corruption, it should be identical to regular windowed mode. What OS/Graphics card do you have? Could you post your infolog?

Forboding Angel:
People who play spring with dual monitors might not want the window pos for borderless at 0,0 that's why I didn't do that. I wasn't sure how best handle it..

FLOZi:
The window position shouldn't change if you run borderless or fullscreen, only when you run on regular windowed mode. What OS are you on?
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: How I achieved fullscreen windowed mode with spring

Post by knorke »

win xp and nvidia 6800

infolog with Fullscreen=0, stuff breaks on alt tab, getting back into game takes some seconds:
http://pastebin.com/r8wcmBpK
Hm, it says "Hang detection triggered", not sure if it also said that yesterday.

infolog with Fullscreen=0, WindowBorderless=1
does not break on alt tab, minimizes instantly and takes no time to recover:
http://pastebin.com/gJg4dZKw


Also worth noting, when I tried yesteday the window with WindowBorderless=1 would cover the whole screen, like normal fullscreen.
When I tried now, I got this:
Image
So I changed
WindowPosX=0 (was 32)
WindowPosY=0 (was 32)
and it was full screen again, but iirc it was 32 yesterday at as well.
MadrMan
Posts: 12
Joined: 17 Jan 2009, 20:13

Re: How I achieved fullscreen windowed mode with spring

Post by MadrMan »

knorke wrote:infolog with Fullscreen=0, WindowBorderless=1
does not break on alt tab, minimizes instantly and takes no time to recover
So it works fine then..? Fullscreen should always be 0 with borderless otherwise it just uses the regular fullscreen. If switch to borderless you need to set WindowPosX/WindowPosY to 0 (spring tends to change them if you play on something else)

There seems to be a bug with borderless setting the WindowPos wrong which i'm gonna have a look at.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: How I achieved fullscreen windowed mode with spring

Post by knorke »

So it works fine then..? Fullscreen should always be 0 with borderless otherwise it just uses the regular fullscreen.
yes, maybe confused that yesterday. infolog should include springsettings.cfg :?
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: How I achieved fullscreen windowed mode with spring

Post by Jools »

Would be nice to get this working, spring always fucks up my desktop when going to fullscreen, and for some reason it makes the windowskey act as shortcut to windows speech recognition on/off (so I can't run command with pressing win+R).

But is it possible to get edge-scrolling to work in windowed mode?
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: How I achieved fullscreen windowed mode with spring

Post by abma »

@Jools
But is it possible to get edge-scrolling to work in windowed mode?
type: /grabinput
User avatar
liamdawe
Posts: 120
Joined: 19 Mar 2010, 15:09

Re: How I achieved fullscreen windowed mode with spring

Post by liamdawe »

So is this going to be put into the next Spring version? Would sure make it easier as a Linux user.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: How I achieved fullscreen windowed mode with spring

Post by abma »

what do you mean with "this"? the windowed mode or grabinput?

grabinput works already... windowed fullscreen mode will be in the next version...
User avatar
liamdawe
Posts: 120
Joined: 19 Mar 2010, 15:09

Re: How I achieved fullscreen windowed mode with spring

Post by liamdawe »

Should have been more clear, was on about the fullscreen windowed mode, which as you say it is, now as a Linux player i am a little more excited :D
Post Reply

Return to “Engine”