aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/view.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-07-17 10:27:03 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-07-17 10:27:03 +1000
commit9cbff272cbb776defe8f45fd7d909be618c0ce22 (patch)
treeb950c77893a8f77b64c3e59fa172591dc3f23af7 /sway/tree/view.c
parentMerge pull request #2285 from emersion/cleanup-swayidle (diff)
downloadsway-9cbff272cbb776defe8f45fd7d909be618c0ce22.tar.gz
sway-9cbff272cbb776defe8f45fd7d909be618c0ce22.tar.zst
sway-9cbff272cbb776defe8f45fd7d909be618c0ce22.zip
Remove superfluous IPC urgent events
When an xwayland view is mapped, the IPC urgent event was being sent on every surface commit. I had intentionally ommitted the check because I figured an urgent surface could update its urgent timestamp by sending urgent a second time. But that's not how it works in xwayland's case, and it makes for more complicated code.
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r--sway/tree/view.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c
index 76e0f42c..8d8d213a 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -1080,6 +1080,9 @@ bool view_is_visible(struct sway_view *view) {
1080} 1080}
1081 1081
1082void view_set_urgent(struct sway_view *view, bool enable) { 1082void view_set_urgent(struct sway_view *view, bool enable) {
1083 if (view_is_urgent(view) == enable) {
1084 return;
1085 }
1083 if (enable) { 1086 if (enable) {
1084 struct sway_seat *seat = input_manager_current_seat(input_manager); 1087 struct sway_seat *seat = input_manager_current_seat(input_manager);
1085 if (seat_get_focus(seat) == view->swayc) { 1088 if (seat_get_focus(seat) == view->swayc) {