Merge lp:~jaapz-b/slingshot/monitorposition into lp:~elementary-pantheon/slingshot/trunk

Proposed by Jaap Broekhuizen
Status: Merged
Merged at revision: 126
Proposed branch: lp:~jaapz-b/slingshot/monitorposition
Merge into: lp:~elementary-pantheon/slingshot/trunk
Diff against target: 36 lines (+19/-1)
1 file modified
src/SlingshotView.vala (+19/-1)
To merge this branch: bzr merge lp:~jaapz-b/slingshot/monitorposition
Reviewer Review Type Date Requested Status
Fabian Thoma Approve
Review via email: mp+88579@code.launchpad.net

Description of the change

The monitor position bug (#909502) is fixed in this branch

To post a comment you must log in.
Revision history for this message
Fabian Thoma (fabianthoma) wrote :

Tested code, and works perfectly fine, merging it

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/SlingshotView.vala'
2--- src/SlingshotView.vala 2011-11-27 16:25:34 +0000
3+++ src/SlingshotView.vala 2012-01-14 14:37:24 +0000
4@@ -224,6 +224,24 @@
5
6 });
7
8+ // position on the right monitor when settings changed
9+ screen.size_changed.connect (() => {
10+ reposition ();
11+ });
12+ screen.monitors_changed.connect (() => {
13+ reposition ();
14+ });
15+
16+ }
17+
18+ private void reposition () {
19+
20+ debug("Repositioning");
21+
22+ Gdk.Rectangle monitor_dimensions;
23+ screen.get_monitor_geometry (this.screen.get_primary_monitor(), out monitor_dimensions);
24+
25+ move_to_coords (monitor_dimensions.x, monitor_dimensions.y); //this would be coordinates 0,0 on the screen
26 }
27
28 public override bool key_press_event (Gdk.EventKey event) {
29@@ -438,7 +456,7 @@
30
31 public void show_slingshot () {
32
33- move_to_coords (0, 0);
34+ reposition ();
35 show_all ();
36 set_modality ((Modality) view_selector.selected);
37

Subscribers

People subscribed via source and target branches