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
=== modified file 'plugins/notify/NotificationStack.vala'
--- plugins/notify/NotificationStack.vala 2014-08-11 18:47:41 +0000
+++ plugins/notify/NotificationStack.vala 2016-07-28 22:19:37 +0000
@@ -31,8 +31,6 @@
3131
32 public Screen screen { get; construct; }32 public Screen screen { get; construct; }
3333
34 int animation_counter = 0;
35
36 public NotificationStack (Screen screen)34 public NotificationStack (Screen screen)
37 {35 {
38 Object (screen: screen);36 Object (screen: screen);
@@ -46,8 +44,7 @@
4644
47 public void show_notification (Notification notification)45 public void show_notification (Notification notification)
48 {46 {
49 if (animation_counter == 0)47 animations_changed (true);
50 animations_changed (true);
5148
52 // raise ourselves when we got something to show49 // raise ourselves when we got something to show
53 get_parent ().set_child_above_sibling (this, null);50 get_parent ().set_child_above_sibling (this, null);
@@ -56,23 +53,25 @@
56 // unless we make our container a bit wider and move the notifications over53 // unless we make our container a bit wider and move the notifications over
57 notification.margin_left = ADDITIONAL_MARGIN;54 notification.margin_left = ADDITIONAL_MARGIN;
5855
56 notification.notify["being-destroyed"].connect (() => {
57 animations_changed (true);
58 });
59
59 notification.destroy.connect (() => {60 notification.destroy.connect (() => {
61 animations_changed (false);
60 update_positions ();62 update_positions ();
61 });63 });
6264
65 notification.get_transition ("entry").completed.connect (() => {
66 animations_changed (false);
67 });
68
63 float height;69 float height;
64 notification.get_preferred_height (Notification.WIDTH, out height, null);70 notification.get_preferred_height (Notification.WIDTH, out height, null);
65 update_positions (height);71 update_positions (height);
6672
67 notification.y = TOP_OFFSET;73 notification.y = TOP_OFFSET;
68 insert_child_at_index (notification, 0);74 insert_child_at_index (notification, 0);
69
70 animation_counter++;
71
72 notification.get_transition ("entry").completed.connect (() => {
73 if (--animation_counter == 0)
74 animations_changed (false);
75 });
76 }75 }
7776
78 void update_positions (float add_y = 0.0f)77 void update_positions (float add_y = 0.0f)

Subscribers

People subscribed via source and target branches