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

Proposed by Rory
Status: Merged
Approved by: Julián Unrrein
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) Approve
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.
Revision history for this message
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
450. By Rory

Check if visible before grabbing device.

Revision history for this message
Rory (roryj) wrote :

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

Revision history for this message
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