After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 776485 - GDK W32: Impossible to restore maximized window via system menu
GDK W32: Impossible to restore maximized window via system menu
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Win32
3.22.x
Other All
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2016-12-25 17:53 UTC by LRN
Modified: 2017-01-09 14:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GDK W32: Change WM_SYSMENU style switch logic (2.10 KB, patch)
2016-12-25 17:53 UTC, LRN
committed Details | Review

Description LRN 2016-12-25 17:53:23 UTC
How to reproduce:
* Maximize a window
* Right-click on the titlebar (or use some other way of calling the
  system menu)

Expected result:
* System menu is shown with the "restore" item being available

Actual result:
* System menu is shown with the "restore" item being grayed out
Comment 1 LRN 2016-12-25 17:53:29 UTC
Created attachment 342466 [details] [review]
GDK W32: Change WM_SYSMENU style switch logic

Instead of checking for window state and giving it extra styles that
fit, just give it all styles that it is missing. It turned out that
otherwise it is impossible to, for example, restore a maximized window
via sysmenu. Also, be more flexible towards GDK/WM window state mismatches
and consider the window minimized/maximized if *either* GDK or WM thinks so.
Comment 2 Ignacio Casal Quinteiro (nacho) 2017-01-06 10:11:07 UTC
Review of attachment 342466 [details] [review]:

If you tested go for it. Seems fair to me
Comment 3 LRN 2017-01-09 14:18:40 UTC
Attachment 342466 [details] pushed as 3326fba - GDK W32: Change WM_SYSMENU style switch logic