| Summary: | Fullscreen issues | ||
|---|---|---|---|
| Product: | [Plasma] kwin | Reporter: | Deve <deveee> |
| Component: | platform-x11-standalone | Assignee: | KWin default assignee <kwin-bugs-null> |
| Status: | RESOLVED NOT A BUG | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Deve
2019-01-30 13:05:47 UTC
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. |