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 785999 - Windows: Fix AeroSnap on HiDPI
Windows: Fix AeroSnap on HiDPI
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Win32
3.22.x
Other Windows
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-08-08 14:19 UTC by Fan, Chun-wei
Modified: 2017-08-18 05:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GDK-Win32: Fix Aerosnap on HiDPI (10.13 KB, patch)
2017-08-08 14:23 UTC, Fan, Chun-wei
none Details | Review
GDK-Win32: Fix Aerosnap on HiDPI (take ii) (15.98 KB, patch)
2017-08-09 04:38 UTC, Fan, Chun-wei
committed Details | Review

Description Fan, Chun-wei 2017-08-08 14:19:10 UTC
Hi,

During the fix of HiDPI issues on Windows in commit 1d0fad3, some incorrect assumptions were found for the AeroSnap support for HiDPI that were actually in there to make up for the bug which was fixed in that commit.

As a result, we need to get rid of those incorrect assumptions in the HiDPI support code for AeroSnap, so that AeroSnap will work properly on HiDPI displays.

I will post a patch shortly to address this issue (apparently, this issue does not exist in GTK+-3.9x).

With blessings, thank you!
Comment 1 Fan, Chun-wei 2017-08-08 14:23:53 UTC
Created attachment 357200 [details] [review]
GDK-Win32: Fix Aerosnap on HiDPI

Hi,

This is the patch that is used to address this issue.

With blessings, thank you!
Comment 2 Ignacio Casal Quinteiro (nacho) 2017-08-08 14:29:16 UTC
Review of attachment 357200 [details] [review]:

LRN is the owner of this code so I'll let him review it.
Comment 3 LRN 2017-08-08 15:17:32 UTC
What about update_fullup_indicator()? It initializes the "to" rect from gdk_window_get_...(), and then divides *and* multiplies by the scale at the same time (which looks weird to me). You can trigger that function by...actually, i'm not sure how to trigger it. You must be drag-resizing a window that is already in FULLUP state...I don't remember what i intended for this code. Maybe it has something to do with multi-monitor setups...

Other than this, the code looks right.
Comment 4 Fan, Chun-wei 2017-08-09 04:38:27 UTC
Created attachment 357226 [details] [review]
GDK-Win32: Fix Aerosnap on HiDPI (take ii)

Hi LRN,

Thanks for the notes, indeed I missed that part, which is triggered when I resize the window from its top to the top of the screen.

I also re-worked the part where we set the X and Y coordinates of the GdkWindow in the Windows/Win32 backend, so that we do always keep track of the X-Y coordinates in the terms of a GdkWindow, so that the code should be a bit clearer and more consistent.

With blessings, thank you!
Comment 5 Fan, Chun-wei 2017-08-18 05:06:54 UTC
Hi,

Any improvements that I could do for this patch?

With blessings, thank you!
Comment 6 LRN 2017-08-18 05:15:17 UTC
Review of attachment 357226 [details] [review]:

I'd say - go for it.
Comment 7 Fan, Chun-wei 2017-08-18 05:32:33 UTC
Hi LRN,

Thanks!  I pushed the patch to gtk-3-22 as ebadaaa.

With blessings, and cheers!