Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't fullscreen on Linux? #140

Closed
adolson opened this issue Feb 24, 2014 · 12 comments
Closed

can't fullscreen on Linux? #140

adolson opened this issue Feb 24, 2014 · 12 comments

Comments

@adolson
Copy link
Contributor

adolson commented Feb 24, 2014

If I check off the fullscreen option in Project Settings, then run the game, it doesn't actually run in fullscreen mode. Tested with the platformer demo, as well as my own project.

I tried checking the list of fullscreen video modes, and it returns an empty array:

    var fsml = OS.get_fullscreen_mode_list()
    print(fsml.size()) # returns 0

Possibly related to this, OS.set_video_mode() doesn't seem to do anything - doesn't resize the window and doesn't allow me to toggle fullscreen.

@TiZ-HugLife
Copy link
Contributor

set_video_mode is actually not implemented on any platform whatsoever; see issue #6.

The reason fullscreen doesn't work on Linux is because the developers haven't yet figured out a way to do it that satisfies them. They don't like the SDL way because it kills alt-tab.

@jorgenpt
Copy link

jorgenpt commented Apr 9, 2014

I'm on my phone and I couldn't find the code in godot that deals with SDL (does it currently use SDL?), but what they want is probably SDL_WINDOW_FULLSCREEN_DESKTOP. It is a much more cooperative mode on Mac and Windows at least, I'm suspecting it would behave better on Linux too.

@TiZ-HugLife
Copy link
Contributor

Godot doesn't use SDL, but they often look to SDL to see what it does for certain things.

@adolson
Copy link
Contributor Author

adolson commented Apr 9, 2014

I'd rather Alt-Tab be killed, than not have fullscreen capability
whatsoever.

On Wed, Apr 9, 2014 at 12:38 PM, TiZ-EX1 [email protected] wrote:

Godot doesn't use SDL, but they often look to SDL to see what it does for
certain things.

Reply to this email directly or view it on GitHubhttps://github.com//issues/140#issuecomment-39986350
.

@TiZ-HugLife
Copy link
Contributor

To be honest, I'd rather the same as well. That kind of issue is fairly prevalent in Linux, but that's one reason that people sometimes run their games in separate X servers.

@jorgenpt
Copy link

jorgenpt commented Apr 9, 2014

I know this is completely off-topic, so feel free to dismiss it, but is there a reason godot doesn't use SDL2, or would they be interested in someone porting it to use SDL? I realize it was first started when SDL1.2 was the only option, but SDL2 has improved tremendously, and is licensed more liberally.

@reduz
Copy link
Member

reduz commented Apr 9, 2014

There is not really that much platform dependent code in Godot to justify
SDL, just the OS class, plus some platform dependent code it's better to
handle different on each platform (specially when exporting).

On Wed, Apr 9, 2014 at 2:03 PM, Jørgen P. Tjernø
[email protected]:

I know this is completely off-topic, so feel free to dismiss it, but why
doesn't godot use SDL2? I realize it was first started when SDL1.2 was the
only option, but SDL2 has improved tremendously, and is licensed more
liberally.

Reply to this email directly or view it on GitHubhttps://github.com//issues/140#issuecomment-39989249
.

@adolson
Copy link
Contributor Author

adolson commented Apr 9, 2014

Juan, have you looked at how SDL2 handles fullscreen (and other Linux
screen/wm stuff)? I read that SDL2 properly handles Alt+Tab now.

On Wed, Apr 9, 2014 at 1:34 PM, reduz [email protected] wrote:

There is not really that much platform dependent code in Godot to justify
SDL, just the OS class, plus some platform dependent code it's better to
handle different on each platform (specially when exporting).

On Wed, Apr 9, 2014 at 2:03 PM, Jørgen P. Tjernø
[email protected]:

I know this is completely off-topic, so feel free to dismiss it, but why
doesn't godot use SDL2? I realize it was first started when SDL1.2 was
the
only option, but SDL2 has improved tremendously, and is licensed more
liberally.

Reply to this email directly or view it on GitHub<
https://github.com/okamstudio/godot/issues/140#issuecomment-39989249>
.

Reply to this email directly or view it on GitHubhttps://github.com//issues/140#issuecomment-39992833
.

@reduz
Copy link
Member

reduz commented Apr 9, 2014

I think honestly writing platform specific code in general isn't difficult
and I like having more control on how everything is implemented (and yes I
know how SDL2 works and all it can do).

It's just pretty much X11 that is a nightmare to deal with, because even if
it works on a given distribution/window manager it might not work on the
next one.

On Wed, Apr 9, 2014 at 3:15 PM, adolson [email protected] wrote:

Juan, have you looked at how SDL2 handles fullscreen (and other Linux
screen/wm stuff)? I read that SDL2 properly handles Alt+Tab now.

On Wed, Apr 9, 2014 at 1:34 PM, reduz [email protected] wrote:

There is not really that much platform dependent code in Godot to
justify
SDL, just the OS class, plus some platform dependent code it's better to
handle different on each platform (specially when exporting).

On Wed, Apr 9, 2014 at 2:03 PM, Jørgen P. Tjernø
[email protected]:

I know this is completely off-topic, so feel free to dismiss it, but
why
doesn't godot use SDL2? I realize it was first started when SDL1.2 was
the
only option, but SDL2 has improved tremendously, and is licensed more
liberally.

Reply to this email directly or view it on GitHub<
https://github.com/okamstudio/godot/issues/140#issuecomment-39989249>
.

Reply to this email directly or view it on GitHub<
https://github.com/okamstudio/godot/issues/140#issuecomment-39992833>
.

Reply to this email directly or view it on GitHubhttps://github.com//issues/140#issuecomment-39997971
.

@reduz
Copy link
Member

reduz commented Apr 9, 2014

In any case, if any of you guys want to give a look at this and send me a
pull request, it would be very appreciated, but so far most contributors of
OS-related fixes seem to be for OSX and Windows. No one seems to like doing
X11 stuff :P

On Wed, Apr 9, 2014 at 3:55 PM, Juan Linietsky [email protected] wrote:

I think honestly writing platform specific code in general isn't difficult
and I like having more control on how everything is implemented (and yes I
know how SDL2 works and all it can do).

It's just pretty much X11 that is a nightmare to deal with, because even
if it works on a given distribution/window manager it might not work on the
next one.

On Wed, Apr 9, 2014 at 3:15 PM, adolson [email protected] wrote:

Juan, have you looked at how SDL2 handles fullscreen (and other Linux
screen/wm stuff)? I read that SDL2 properly handles Alt+Tab now.

On Wed, Apr 9, 2014 at 1:34 PM, reduz [email protected] wrote:

There is not really that much platform dependent code in Godot to
justify
SDL, just the OS class, plus some platform dependent code it's better
to
handle different on each platform (specially when exporting).

On Wed, Apr 9, 2014 at 2:03 PM, Jørgen P. Tjernø
[email protected]:

I know this is completely off-topic, so feel free to dismiss it, but
why
doesn't godot use SDL2? I realize it was first started when SDL1.2
was
the
only option, but SDL2 has improved tremendously, and is licensed more
liberally.

Reply to this email directly or view it on GitHub<
https://github.com/okamstudio/godot/issues/140#issuecomment-39989249>
.

Reply to this email directly or view it on GitHub<
https://github.com/okamstudio/godot/issues/140#issuecomment-39992833>
.

Reply to this email directly or view it on GitHubhttps://github.com//issues/140#issuecomment-39997971
.

@paulloz
Copy link
Member

paulloz commented May 14, 2014

I've started working on this this evening : https://github.com/Paulloz/godot/tree/x11-fullscreen
Basically, what I think we can do is not grab the keyboard while we're in fullscreen mode. It'll let the player alt-tab during the game but as we grab the mouse we still are somehow locked into the game window.
Still need to restore default resolution when we're exiting the game (the code is done but I'm looking for the right place to call reset_resolution...).

@reduz, haven't found any styleguide down here so if there are coding rules that I've ignored, my apologies ;)

@ghost ghost mentioned this issue Aug 4, 2014
@reduz
Copy link
Member

reduz commented Sep 21, 2014

Finally works!

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

No branches or pull requests

5 participants