Merge lp:~roryj/slingshot/fix-1356641 into lp:~elementary-pantheon/slingshot/trunk

Proposed by Rory on 2014-08-31
Status: Merged
Approved by: Julián Unrrein on 2014-08-31
Approved revision: 450
Merged at revision: 450
Proposed branch: lp:~roryj/slingshot/fix-1356641
Merge into: lp:~elementary-pantheon/slingshot/trunk
Diff against target: 24 lines (+5/-2)
1 file modified
src/SlingshotView.vala (+5/-2)
To merge this branch: bzr merge lp:~roryj/slingshot/fix-1356641
Reviewer Review Type Date Requested Status
Julián Unrrein (community) 2014-08-31 Approve on 2014-08-31
Review via email: mp+232825@code.launchpad.net

Commit message

Check if visible before grabbing device. Fixes bug #1356641.

Description of the change

Check if visible before grabbing device. Fixes bug #1356641.

To post a comment you must log in.
Julián Unrrein (junrrein) wrote :

I can still replicate the issue, but it's a lot harder to do so. I have to click around 30 times in a row to make it hang.

lp:~roryj/slingshot/fix-1356641 updated on 2014-08-31
450. By Rory on 2014-08-31

Check if visible before grabbing device.

Rory (roryj) wrote :

Finally managed to recreate it... I think this should of fixed it?

Julián Unrrein (junrrein) wrote :

Indeed it is fixed now. Code is good too. Good work!

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 2014-07-10 09:40:47 +0000
3+++ src/SlingshotView.vala 2014-08-31 21:38:45 +0000
4@@ -242,7 +242,9 @@
5 if (pointer_status != Gdk.GrabStatus.SUCCESS || keyboard_status != Gdk.GrabStatus.SUCCESS) {
6 // If grab failed, retry again. Happens when "Applications" button is long held.
7 Timeout.add (100, () => {
8- grab_device ();
9+ if (visible)
10+ grab_device ();
11+
12 return false;
13 });
14 }
15@@ -262,7 +264,8 @@
16 }
17
18 public override bool map_event (Gdk.EventAny event) {
19- grab_device ();
20+ if (visible)
21+ grab_device ();
22
23 return false;
24 }

Subscribers

People subscribed via source and target branches