Hi, Mailing list seems empty, so I post it here. I'm Supertuxkart developer. We get some bug reports recently, like: https://github.com/supertuxkart/stk-code/issues/3726 https://github.com/supertuxkart/stk-code/issues/3689 Also on IRC: 18:50 < lizzycaravan> hi 18:50 < lizzycaravan> i installed the game from the arch repos 18:50 < lizzycaravan> and i cannot change the game resolution 18:50 < lizzycaravan> when i last installed the game 2 months ago, that was possible 18:51 < lizzycaravan> is that well known, or is it something related to my new system? I was able to reproduce similar issue with kwin-x11 on ubuntu 18.04. For me XGetGeometry() was reporting window size as it would be with decorations even though it was already changed to fullscreen. Everything is in this file: https://github.com/supertuxkart/stk-code/blob/master/lib/irrlicht/source/Irrlicht/CIrrDeviceLinux.cpp It's a bit messy, but basically we: - change resolution using xrandr - create a window - change a window to fullscreen with sending _NET_WM_STATE_FULLSCREEN event - wait in a loop until fullscreen window property is set - read actual window size, because window manager could change it to different values, esp. in windowed mode Probably waiting for fullscreen property doesn't guarantee that window is ready (and also that resolution is already changed). Is there something more we can do to get correct window size? In my case I can "solve" it by waiting several miliseconds before using XGetGeometry(). But it's another ugly hack...
When changing to fullscreen a window manager sends a configure notify event to the window. Please see ICCCM for how to use this https://www.x.org/releases/X11R7.6/doc/xorg-docs/specs/ICCCM/icccm.html#client_responses_to_window_manager_actions
Ok, I will have a look. I didn't test it yet, but my understanding is that I will get ConfigureNotify event twice (when resolution was changed and when window was changed to fullscreen) or only once (when resolution was changed before window was created). Or in theory never if window size was not changed (?). So that in practice I still don't know how long I should wait to make sure that window is "ready". And I need to know real window size before returning from CreateWindow() function, otherwise it would need some major refactoring... ... And some off-topic: on wayland I changed kde decoration protocol to xdg decoration some time ago and we will have new release soon. I assume that it's ok for KDE?
(In reply to Deve from comment #2) > Ok, I will have a look. > > I didn't test it yet, but my understanding is that I will get > ConfigureNotify event twice (when resolution was changed and when window was > changed to fullscreen) or only once (when resolution was changed before > window was created). Or in theory never if window size was not changed (?). > So that in practice I still don't know how long I should wait to make sure > that window is "ready". > > And I need to know real window size before returning from CreateWindow() > function, otherwise it would need some major refactoring... sorry to say, but you are doing it wrong. You cannot know how many events a window manager will send you. The window manager may reparent - or not, the window manager may react on the randr event - or not, the window manager may react on the fullscreen change request - or not. This is an async protocol where you could get notify events any time. Imagine Plasma reacting to the new screen dimensions and moving the panel before you switch to fullscreen - yet another configure event due to constraints changing. I fear you have to bite the bullet and refactor it. Don't wait in a loop just react on every configure event. You might also get them after you show the window. > > ... > > And some off-topic: on wayland I changed kde decoration protocol to xdg > decoration some time ago and we will have new release soon. I assume that > it's ok for KDE? Yes, next plasma release will support it.
Actually it's not me... STK was never designed to allow resizeable window. And it needs to know window size before for example fonts are loaded.
Well then don't allow resizing. E.g. use override redirect or set appropriate min/max sizes.