summaryrefslogtreecommitdiff
diff options
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2016-04-25 17:09:34 +0200
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2016-04-25 17:09:34 +0200
commit884d6ab87fdd8e45054afa4c3a9ce6c6e672f553 (patch)
tree11d5c8dfc98a297021851db0bb25f8d74fd2cc50
parent43b91424b4e3dbfc4acead80788cd6be170fb4bb (diff)
SwitcherView: only request actions if icon selection is valid
(bzr r4105.6.3)
-rw-r--r--launcher/SwitcherView.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/launcher/SwitcherView.cpp b/launcher/SwitcherView.cpp
index 64047725e..e57b7f529 100644
--- a/launcher/SwitcherView.cpp
+++ b/launcher/SwitcherView.cpp
@@ -434,14 +434,16 @@ void SwitcherView::HandleMouseUp(int x, int y, int button)
if (button == 1 || button == 2 || button == 3)
{
if (icon_index >= 0 && icon_index == last_icon_selected_)
+ {
model_->Select(icon_index);
- if (button == 1)
- hide_request.emit(true);
- else if (button == 2)
- switcher_close_current.emit();
- else if (button == 3)
- switcher_start_detail.emit();
+ if (button == 1)
+ hide_request.emit(true);
+ else if (button == 2)
+ switcher_close_current.emit();
+ else if (button == 3)
+ switcher_start_detail.emit();
+ }
}
}