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 787934 - nativeWindowPlacement: Stop copying everything and the kitchen sink
nativeWindowPlacement: Stop copying everything and the kitchen sink
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: extensions
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2017-09-20 09:44 UTC by Florian Müllner
Modified: 2017-10-17 15:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
naturalWindowPlacement: Remove unused stuff (2.64 KB, patch)
2017-09-20 09:44 UTC, Florian Müllner
committed Details | Review
naturalWindowPlacement: Don't copy relayout() function (2.92 KB, patch)
2017-09-20 09:44 UTC, Florian Müllner
committed Details | Review
nativeWindowPlacement: Handle captions-on-top settings changes (2.11 KB, patch)
2017-09-20 09:45 UTC, Florian Müllner
committed Details | Review
nativeWindowPlacement: Use custom strategy to hook into layout (9.37 KB, patch)
2017-09-20 09:45 UTC, Florian Müllner
committed Details | Review

Description Florian Müllner 2017-09-20 09:44:44 UTC
See patches.
Comment 1 Florian Müllner 2017-09-20 09:44:50 UTC
Created attachment 360108 [details] [review]
naturalWindowPlacement: Remove unused stuff
Comment 2 Florian Müllner 2017-09-20 09:44:56 UTC
Created attachment 360109 [details] [review]
naturalWindowPlacement: Don't copy relayout() function

To move title captions to the top, we can simply apply a translation
before calling the unmodified original function.
Comment 3 Florian Müllner 2017-09-20 09:45:02 UTC
Created attachment 360110 [details] [review]
nativeWindowPlacement: Handle captions-on-top settings changes

Currently the injection to move title captions to the top depends on
the value of the setting at the time the extension is enabled.
Instead, do the injections unconditionally and query the setting
inside the function to pick up settings changes.
Comment 4 Florian Müllner 2017-09-20 09:45:09 UTC
Created attachment 360111 [details] [review]
nativeWindowPlacement: Use custom strategy to hook into layout

Instead of copying a long function for a single changed line, wrap the
layout algorithm in a LayoutStrategy so the workspace code picks it
up without modifications.
Comment 5 Florian Müllner 2017-10-17 15:54:54 UTC
Attachment 360108 [details] pushed as a0cae3d - naturalWindowPlacement: Remove unused stuff
Attachment 360109 [details] pushed as 97d1cbc - naturalWindowPlacement: Don't copy relayout() function
Attachment 360110 [details] pushed as 778eebc - nativeWindowPlacement: Handle captions-on-top settings changes
Attachment 360111 [details] pushed as ef99394 - nativeWindowPlacement: Use custom strategy to hook into layout