Fullscreen toggle with the f button doesn't work properly

Bug #1459529 reported by GunChleoc
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
widelands
Fix Released
High
Unassigned

Bug Description

On Ubuntu, if I hit the f button, the fullscreen toggle doesn't work. If I keep the button pressed, it will toggle back and forth very fast and then the setting will stick eventually.

A problem has also been reported for Windows on the bottom of this forum post: https://wl.widelands.org/forum/topic/1742/?page=1#post-13894

See also:
bug 1398733 "Fullscreen Menus cannot relayout themselves"
bug 1598588 "Child Windows doesn't change position when toggling to window mode "

Tags: regression ui

Related branches

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

Oh, thanks for reporting.

Can confirm here with r7469 on Ubuntu 15.04. Have you upgraded to 15.04 as well. I can't pin-point exactly when, but this used to work up until quite recently. I don't know how or when it regressed though, has anyone touched this code recently?

Changed in widelands:
importance: Undecided → High
status: New → Confirmed
tags: added: regression ui
Revision history for this message
Venatrix (elisabeth) wrote :

Hmm… Well, I’m not a programmer and so on, but I remember that there was a change about the SDL_KEYUP event (rev 7462). As it feels like Widelands changes to fullscreen when pressing f, but changes back when releasing the key, maybe there’s the problem?

Revision history for this message
GunChleoc (gunchleoc) wrote :

Venatrix ix spot on. I have found the bug and will upload a branch soon.

GunChleoc (gunchleoc)
Changed in widelands:
status: Confirmed → In Progress
assignee: nobody → GunChleoc (gunchleoc)
milestone: none → build19-rc1
GunChleoc (gunchleoc)
Changed in widelands:
status: In Progress → Fix Committed
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Good point, I forget about the KEYUP.

It works again now, well mostly... When I'm in the main menu it looks like it sometimes fail to expand the window content when going fullscreen, and when I switch back to windowed mode it displays half the menu, because the bottom-right window corner is where the center of the screen used to be when it was in fullscreen. I seem to remember it worked better than this. Are other seeing this too, or is it an Ubuntu and/or graphics driver issue on my side?

Revision history for this message
GunChleoc (gunchleoc) wrote :

No, I get this too. It is fine in-game though.

GunChleoc (gunchleoc)
Changed in widelands:
status: Fix Committed → Triaged
assignee: GunChleoc (gunchleoc) → nobody
Revision history for this message
kaputtnik (franku) wrote :

Setting resolution to 800x600 and switching from window to fullscreen the graphic is totally messed up. See screenshot.

Revision history for this message
TiborB (tiborb95) wrote :

Similar problem on arch linux. What is interesting, changing from and to follscreen via menu works smoothly

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

kaputtnik: Yes, this is presumably the same issue as mentioned in #4 and #5. Thanks for adding a screenshot.

By the way, by holding down 'f' for a longer period of time I believe I was able to trigger the flickering mentioned in bug 1529806 on Ubuntu. No crash though.

Revision history for this message
SirVer (sirver) wrote :

The problem here is that switching in the menus will not resize and relayout the menus. Fixing this would require recoding all menus to have a relayout() method that creates the actual UI elements. Right now all of them do it in the constructor. What to do here?

Revision history for this message
GunChleoc (gunchleoc) wrote :

Probably what you just suggested - go through them all and define this method. It will be a lot of code, but it doesn't sound too difficult.

Revision history for this message
kaputtnik (franku) wrote :

I am just in a situation where the "f" button doesn't work anymore. I am not sure if this is related to widelands or the compositing of the windowmanager of my kde-desktop. If i switch often between fullscreen and window mode, the f-button don't work anymore. Even if i disable the compositing of the window manager.

If i am in window mode and hit "f" the widelands window moves to the upper left corner, but the size of the window still remains. Hitting the "f"-button again, a bit flickering is seen but nothing happens, or fullscreen is toggled.

Earlier i was in fullscreen mode with map->save screen (which covers the whole screen) and toggled to window mode. The map-> save menu isn't adjusted so i couldn't click the buttons on the bottom. Toggling to fullscreen didn't worked in this situation, so the only thing i could do to close widelands is to click on the [X] in the windows title bar.

GunChleoc (gunchleoc)
Changed in widelands:
assignee: nobody → GunChleoc (gunchleoc)
status: Triaged → In Progress
Revision history for this message
GunChleoc (gunchleoc) wrote :

The problem in fullscreen mode is that the screen isn't repainted. I think the way to go here is to have a controller object for all fullscreen menus, like the Options menu does.

This is a lot of code though, so I'm retargetting this bug.

Changed in widelands:
milestone: build19-rc1 → none
GunChleoc (gunchleoc)
description: updated
Revision history for this message
kaputtnik (franku) wrote :

I think the following get solved when this bug is solved. If this is another bug, please let me know:

* starting widelands with fullscreen and resolution 800x600
* Open editor
* open tool menu and place it in the upper right corner
* switch to window mode

Results:
1. The tool menu isn't shown anymore until you click twice on "bottom menu -> tool menu"
2. The main menu (first button in bottom menu) isn't shown in the middle of the window. It is shown at the position as where it is placed in fullscreen. Other menus (Tool size, Minimap) are shown in the middle of the window.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Can you put this in a separate bug report please, and link the to each other in the introductory post? #13 might solve part of this bug or might be a completely different bug.

Revision history for this message
kaputtnik (franku) wrote :

Done.

description: updated
GunChleoc (gunchleoc)
Changed in widelands:
status: In Progress → Triaged
assignee: GunChleoc (gunchleoc) → nobody
GunChleoc (gunchleoc)
Changed in widelands:
milestone: none → build20-rc1
GunChleoc (gunchleoc)
Changed in widelands:
status: Triaged → In Progress
assignee: nobody → GunChleoc (gunchleoc)
GunChleoc (gunchleoc)
Changed in widelands:
status: In Progress → Fix Committed
assignee: GunChleoc (gunchleoc) → nobody
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build20-rc1

Changed in widelands:
status: Fix Committed → Fix Released
Revision history for this message
GunChleoc (gunchleoc) wrote :
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.