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
=== modified file 'src/SlingshotView.vala'
--- src/SlingshotView.vala 2014-07-10 09:40:47 +0000
+++ src/SlingshotView.vala 2014-08-31 21:38:45 +0000
@@ -242,7 +242,9 @@
242 if (pointer_status != Gdk.GrabStatus.SUCCESS || keyboard_status != Gdk.GrabStatus.SUCCESS) {242 if (pointer_status != Gdk.GrabStatus.SUCCESS || keyboard_status != Gdk.GrabStatus.SUCCESS) {
243 // If grab failed, retry again. Happens when "Applications" button is long held.243 // If grab failed, retry again. Happens when "Applications" button is long held.
244 Timeout.add (100, () => {244 Timeout.add (100, () => {
245 grab_device ();245 if (visible)
246 grab_device ();
247
246 return false;248 return false;
247 });249 });
248 }250 }
@@ -262,7 +264,8 @@
262 }264 }
263265
264 public override bool map_event (Gdk.EventAny event) {266 public override bool map_event (Gdk.EventAny event) {
265 grab_device ();267 if (visible)
268 grab_device ();
266269
267 return false;270 return false;
268 }271 }

Subscribers

People subscribed via source and target branches