Merge lp:~donadigo/gala/fix-mouse-input-freeze into lp:gala

Proposed by Adam Bieńkowski
Status: Merged
Merged at revision: 532
Proposed branch: lp:~donadigo/gala/fix-mouse-input-freeze
Merge into: lp:gala
Diff against target: 55 lines (+10/-11)
1 file modified
plugins/notify/NotificationStack.vala (+10/-11)
To merge this branch: bzr merge lp:~donadigo/gala/fix-mouse-input-freeze
Reviewer Review Type Date Requested Status
Gala developers Pending
Review via email: mp+300518@code.launchpad.net

Commit message

- Fix bug #1582809: "Clicking a notification freezes mouse input".

Description of the change

Fixes bug #1582809: "Clicking a notification freezes mouse input".

From the documentation of freeze_track property:

Set this property to true *while animating* an actor if you have tracked
actors to prevent constant recalculations (...)

I removed the animation counter and now freeze_track will be true when the animation of notification is happening (either appearing or sliding off).

I've also moved the entry completed connection to where all connections are happening.

To post a comment you must log in.
530. By Adam Bieńkowski

notify: freeze track of notifications area only when a notification animation is happening

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/notify/NotificationStack.vala'
2--- plugins/notify/NotificationStack.vala 2014-08-11 18:47:41 +0000
3+++ plugins/notify/NotificationStack.vala 2016-07-28 22:19:37 +0000
4@@ -31,8 +31,6 @@
5
6 public Screen screen { get; construct; }
7
8- int animation_counter = 0;
9-
10 public NotificationStack (Screen screen)
11 {
12 Object (screen: screen);
13@@ -46,8 +44,7 @@
14
15 public void show_notification (Notification notification)
16 {
17- if (animation_counter == 0)
18- animations_changed (true);
19+ animations_changed (true);
20
21 // raise ourselves when we got something to show
22 get_parent ().set_child_above_sibling (this, null);
23@@ -56,23 +53,25 @@
24 // unless we make our container a bit wider and move the notifications over
25 notification.margin_left = ADDITIONAL_MARGIN;
26
27+ notification.notify["being-destroyed"].connect (() => {
28+ animations_changed (true);
29+ });
30+
31 notification.destroy.connect (() => {
32+ animations_changed (false);
33 update_positions ();
34 });
35
36+ notification.get_transition ("entry").completed.connect (() => {
37+ animations_changed (false);
38+ });
39+
40 float height;
41 notification.get_preferred_height (Notification.WIDTH, out height, null);
42 update_positions (height);
43
44 notification.y = TOP_OFFSET;
45 insert_child_at_index (notification, 0);
46-
47- animation_counter++;
48-
49- notification.get_transition ("entry").completed.connect (() => {
50- if (--animation_counter == 0)
51- animations_changed (false);
52- });
53 }
54
55 void update_positions (float add_y = 0.0f)

Subscribers

People subscribed via source and target branches