summaryrefslogtreecommitdiff
path: root/libs/canvas
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-01-20 10:59:44 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2014-01-20 10:59:44 -0500
commit3c5a870289360869ba4d61216a6b332c8c6a64d4 (patch)
tree7960bfe3b823f612b2c24288b5514a2159e865fc /libs/canvas
parent269120905081e8b6fc47a96f8595637c2f926442 (diff)
a better, more general fix for the previous Canvas::item_going_away() issue. There is no need to repick the current item if the item going away is NOT the current item
Diffstat (limited to 'libs/canvas')
-rw-r--r--libs/canvas/canvas.cc16
1 files changed, 4 insertions, 12 deletions
diff --git a/libs/canvas/canvas.cc b/libs/canvas/canvas.cc
index 2cf0a7ea15..8a31d1fa9f 100644
--- a/libs/canvas/canvas.cc
+++ b/libs/canvas/canvas.cc
@@ -558,17 +558,10 @@ GtkCanvas::item_going_away (Item* item, boost::optional<Rect> bounding_box)
queue_draw_item_area (item, bounding_box.get ());
}
- /* no need to send a leave event to this item, since it is going away
- */
-
if (_new_current_item == item) {
_new_current_item = 0;
}
- if (_current_item == item) {
- _current_item = 0;
- }
-
if (_grabbed_item == item) {
_grabbed_item = 0;
}
@@ -577,11 +570,10 @@ GtkCanvas::item_going_away (Item* item, boost::optional<Rect> bounding_box)
_focused_item = 0;
}
- /* an item which ignores events can never be the current item
- so we do not need to repick the current item.
- */
-
- if (!item->ignore_events()) {
+ if (_current_item == item) {
+ /* no need to send a leave event to this item, since it is going away
+ */
+ _current_item = 0;
pick_current_item (0); // no mouse state
}