Can not toggle fullscreen with Alt+Enter or resize with w.m.

Bug #536500 reported by Sigra
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Wishlist
Unassigned

Bug Description

It is not possible to toggle fullscreen mode with Alt+Enter or resize a window with the window manager. Other SDL applications like openttd can do this just fine.

Related branches

Revision history for this message
shutdownrunner (shutdownrunner-users) wrote :

You could try this:

Index: src/wlapplication.cc
===================================================================
--- src/wlapplication.cc (wersja 3428)
+++ src/wlapplication.cc (kopia robocza)
@@ -473,6 +473,14 @@
   switch (ev.type) {
   case SDL_KEYDOWN:
   case SDL_KEYUP:
+ if (ev.key.keysym.sym == SDLK_F9)
+ {
+ if (ev.type == SDL_KEYDOWN)
+ {
+ g_gr->toggle_fullscreen();
+ }
+ break;
+ }
    if (ev.key.keysym.sym == SDLK_F10) // TEMP - get out of here quick
    {
     if (ev.type == SDL_KEYDOWN)

Nasenbaer (nasenbaer)
Changed in widelands:
status: New → Confirmed
importance: Undecided → Wishlist
Revision history for this message
Samith Sandanayake (samithdisal) wrote :

fullscreen toggle is supported with F key (am i wrong??)

Revision history for this message
SirVer (sirver) wrote :

From this site:
http://sdl.beuc.net/sdl.wiki/SDL_WM_ToggleFullScreen

Toggles the application between windowed and fullscreen mode, if supported. (X11 is the only target currently supported, BeOS support is experimental).

There is also an example how to do this more portably, but I doubt it is possible within the way widelands handles graphics at the moment.

TimoWi, I assigned you this because you are currently "the graphics guy", If you do not want to work on this or it seems doing is unreasonable in your current scope, just unassign yourself again.

Changed in widelands:
assignee: nobody → Timowi (timo-wingender)
Revision history for this message
Timowi (timo-wingender) wrote :

Try pressing 'f' (like fullscreen) while playing widelands. For me it toggles between fullscreen and windowed mode without problems. There is no problem with the current graphic system. Maybe this depends on the System. But then it's a problem of SDL.

But it is more or less useless for me. Most of the time I play in windowed mode to switch between widelands, console and debugger ;) If I switch to fullscreen it does not use my native screen resolution ant that looks horrible. So that is what the wish mentions too: resizing the window.

Resizing the window would be a nice feature but is far more complicated then switching between fullscreen and windowed mode. The problem with that is the ui code and the integration of ui and game code. The easiest way to do the resizing would be to restart the ui with a new size without impact to the game. Another way is to change the ui so it can be resized or use a foreign ui that can do. I will try the resizing in my opengl branch. But I think it's much to do to get this working.

My longterm goal is to get the ui and rendering so independent that it can run in an own thread or even on a different computer. I had a talk with Erik about this and he came up with some good suggestions. But no one thought that out so someone can start implementation. I hope some starts this so I only have to help a bit. :)

Revision history for this message
SirVer (sirver) wrote :

I'd also love this. This would allow to run automatic tests on some features without having to load graphics and their like. Big win!

I leave this bug on confirmed: Toggling fullscreen to a good resolution is like resizing for all OS except linux with X11.

Revision history for this message
SirVer (sirver) wrote :

Setting to incomplete for bug sweeping.

Changed in widelands:
status: Confirmed → Incomplete
Revision history for this message
wl-zocker (wl-zocker) wrote :

This bug report will not expire because it is assigned to someone.

SirVer (sirver)
Changed in widelands:
assignee: Timowi (timo-wingender) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for widelands because there has been no activity for 60 days.]

Changed in widelands:
status: Incomplete → Expired
Revision history for this message
SirVer (sirver) wrote :

I feel like this is not a priority anymore. Or does anybody still miss this feature?

Changed in widelands:
status: Expired → Incomplete
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

I'd say this is a nice-to have, not must-have feature. There doesn't seem to have been much demand for it lately, at least.

A couple of things which might be relevant to this discussion:
- What are other games doing, do they support it? Do players expect this to work?
- It has been discussed from time to time and I remember someone stating that fullscreen switching might go away completely in newer versions of SDL. Now that SDL2 has been out for a while, I wonder whether the plan is to move to that eventually and in that case what the state of fullscreen toggling would be like. If the underlying libraries doesn't support it, that has a rather large impact on this discussion.

Revision history for this message
GunChleoc (gunchleoc) wrote :
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

See also the comments in bug 682351.

Revision history for this message
SirVer (sirver) wrote :

I do not think we should time into this right now. I would require a massive refactoring of the class Graphic and the use of g_gr and I see little benefit to it right now.

Changed in widelands:
status: Incomplete → Won't Fix
SirVer (sirver)
Changed in widelands:
status: Won't Fix → Confirmed
status: Confirmed → In Progress
assignee: nobody → SirVer (sirver)
milestone: none → build19-rc1
Revision history for this message
SirVer (sirver) wrote :

Fixed in r7277.

Changed in widelands:
status: In Progress → Fix Committed
assignee: SirVer (sirver) → nobody
GunChleoc (gunchleoc)
Changed in widelands:
status: Fix Committed → Fix Released
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build19-rc1.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.