Merge lp:~azzar1/bamf/fix-highdpi-actionmenu into lp:bamf

Proposed by Andrea Azzarone
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: 643
Merged at revision: 644
Proposed branch: lp:~azzar1/bamf/fix-highdpi-actionmenu
Merge into: lp:bamf
Diff against target: 19 lines (+8/-1)
1 file modified
src/bamf-legacy-window.c (+8/-1)
To merge this branch: bzr merge lp:~azzar1/bamf/fix-highdpi-actionmenu
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
Review via email: mp+301067@code.launchpad.net

Commit message

Unscale x/y coordinates returned by top_window_action_menu.

Description of the change

Using index_monitor 0 on X is just fine as we don't support per-monitor scaling factor.

To post a comment you must log in.
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Good one!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/bamf-legacy-window.c'
2--- src/bamf-legacy-window.c 2016-06-01 11:57:58 +0000
3+++ src/bamf-legacy-window.c 2016-07-25 13:31:50 +0000
4@@ -543,8 +543,15 @@
5 top_window_action_menu (GtkMenu *menu, gint *x, gint *y, gboolean *push, gpointer data)
6 {
7 BamfLegacyWindow *self = data;
8- gint w, h;
9+ gint w, h, scale;
10+
11+ scale = gdk_screen_get_monitor_scale_factor (gdk_screen_get_default (), 0);
12+ scale = !scale ? 1: scale;
13+
14 wnck_window_get_client_window_geometry (self->priv->legacy_window, x, y, &w, &h);
15+ *x /= scale;
16+ *y /= scale;
17+
18 *push = TRUE;
19 }
20

Subscribers

People subscribed via source and target branches

to all changes: