Merge lp:~manuel-nicetto/unity/bug-754565 into lp:unity

Proposed by Manuel Nicetto
Status: Superseded
Proposed branch: lp:~manuel-nicetto/unity/bug-754565
Merge into: lp:unity
Diff against target: 147 lines (+37/-4)
4 files modified
plugins/unityshell/src/Launcher.cpp (+22/-1)
plugins/unityshell/src/Launcher.h (+2/-0)
plugins/unityshell/src/LauncherIcon.cpp (+11/-3)
plugins/unityshell/src/LauncherIcon.h (+2/-0)
To merge this branch: bzr merge lp:~manuel-nicetto/unity/bug-754565
Reviewer Review Type Date Requested Status
Unity Team Pending
Review via email: mp+64907@code.launchpad.net

This proposal has been superseded by a proposal from 2011-06-24.

To post a comment you must log in.
lp:~manuel-nicetto/unity/bug-754565 updated
1242. By Manuel Nicetto

fixed _shift_pressed assigned twice in LauncherIcon.cpp

1243. By Manuel Nicetto

-- Fixed key release checking the correct shift pressed event reported by Tim Penhey
-- Fixed identation errors reported from Marco Biscaro

1244. By Manuel Nicetto

-- fixed another identation error

1245. By Manuel Nicetto

Pass shift_pressed on click behavior as suggested by Jason

Unmerged revisions

1245. By Manuel Nicetto

Pass shift_pressed on click behavior as suggested by Jason

1244. By Manuel Nicetto

-- fixed another identation error

1243. By Manuel Nicetto

-- Fixed key release checking the correct shift pressed event reported by Tim Penhey
-- Fixed identation errors reported from Marco Biscaro

1242. By Manuel Nicetto

fixed _shift_pressed assigned twice in LauncherIcon.cpp

1241. By Manuel Nicetto

* Regression: shift+click on a launcher icon to open a new application instance gone

-- Manuel Nicetto <email address hidden> Thu 16 Jun 2011 23:31

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/unityshell/src/Launcher.cpp'
--- plugins/unityshell/src/Launcher.cpp 2011-06-22 19:18:47 +0000
+++ plugins/unityshell/src/Launcher.cpp 2011-06-24 20:43:44 +0000
@@ -258,6 +258,7 @@
258 _parent = parent;258 _parent = parent;
259 _screen = screen;259 _screen = screen;
260 _active_quicklist = 0;260 _active_quicklist = 0;
261 _shift_pressed=false;
261 262
262 _hide_machine = new LauncherHideMachine ();263 _hide_machine = new LauncherHideMachine ();
263 _set_hidden_connection = (sigc::connection) _hide_machine->should_hide_changed.connect (sigc::mem_fun (this, &Launcher::SetHidden)); 264 _set_hidden_connection = (sigc::connection) _hide_machine->should_hide_changed.connect (sigc::mem_fun (this, &Launcher::SetHidden));
@@ -276,6 +277,7 @@
276 OnMouseMove.connect (sigc::mem_fun (this, &Launcher::RecvMouseMove));277 OnMouseMove.connect (sigc::mem_fun (this, &Launcher::RecvMouseMove));
277 OnMouseWheel.connect (sigc::mem_fun (this, &Launcher::RecvMouseWheel));278 OnMouseWheel.connect (sigc::mem_fun (this, &Launcher::RecvMouseWheel));
278 OnKeyPressed.connect (sigc::mem_fun (this, &Launcher::RecvKeyPressed));279 OnKeyPressed.connect (sigc::mem_fun (this, &Launcher::RecvKeyPressed));
280 OnKeyReleased.connect (sigc::mem_fun (this, &Launcher::RecvKeyReleased));
279 OnMouseDownOutsideArea.connect (sigc::mem_fun (this, &Launcher::RecvMouseDownOutsideArea));281 OnMouseDownOutsideArea.connect (sigc::mem_fun (this, &Launcher::RecvMouseDownOutsideArea));
280 //OnEndFocus.connect (sigc::mem_fun (this, &Launcher::exitKeyNavMode));282 //OnEndFocus.connect (sigc::mem_fun (this, &Launcher::exitKeyNavMode));
281 283
@@ -3050,6 +3052,7 @@
30503052
3051void Launcher::RecvMouseDown(int x, int y, unsigned long button_flags, unsigned long key_flags)3053void Launcher::RecvMouseDown(int x, int y, unsigned long button_flags, unsigned long key_flags)
3052{3054{
3055 UnGrabKeyboard ();
3053 _last_button_press = nux::GetEventButton (button_flags);3056 _last_button_press = nux::GetEventButton (button_flags);
3054 SetMousePosition (x, y);3057 SetMousePosition (x, y);
30553058
@@ -3142,6 +3145,7 @@
3142{3145{
3143 SetMousePosition (x, y);3146 SetMousePosition (x, y);
3144 SetStateMouseOverLauncher (true);3147 SetStateMouseOverLauncher (true);
3148 GrabKeyboard ();
3145 3149
3146 // make sure we actually get a chance to get events before turning this off3150 // make sure we actually get a chance to get events before turning this off
3147 if (x > 0)3151 if (x > 0)
@@ -3156,6 +3160,7 @@
3156 SetMousePosition (x, y);3160 SetMousePosition (x, y);
3157 SetStateMouseOverLauncher (false);3161 SetStateMouseOverLauncher (false);
3158 LauncherIcon::SetSkipTooltipDelay (false);3162 LauncherIcon::SetSkipTooltipDelay (false);
3163 UnGrabKeyboard ();
31593164
3160 EventLogic ();3165 EventLogic ();
3161 EnsureAnimation ();3166 EnsureAnimation ();
@@ -3277,6 +3282,12 @@
3277{3282{
32783283
3279 LauncherModel::iterator it;3284 LauncherModel::iterator it;
3285
3286 if(key_sym==NUX_VK_SHIFT){
3287 _shift_pressed=true;
3288 } else {
3289 _shift_pressed=false;
3290 }
32803291
3281 /*3292 /*
3282 * all key events below are related to keynavigation. Make an additional3293 * all key events below are related to keynavigation. Make an additional
@@ -3383,6 +3394,14 @@
3383 }3394 }
3384}3395}
33853396
3397void
3398Launcher::RecvKeyReleased (unsigned int key_sym,
3399 unsigned long key_code,
3400 unsigned long key_state)
3401{
3402 _shift_pressed=false;
3403}
3404
3386void Launcher::RecvQuicklistOpened (QuicklistView *quicklist)3405void Launcher::RecvQuicklistOpened (QuicklistView *quicklist)
3387{3406{
3388 _hide_machine->SetQuirk (LauncherHideMachine::QUICKLIST_OPEN, true);3407 _hide_machine->SetQuirk (LauncherHideMachine::QUICKLIST_OPEN, true);
@@ -3465,7 +3484,9 @@
3465 _icon_mouse_down->MouseUp.emit (nux::GetEventButton (button_flags));3484 _icon_mouse_down->MouseUp.emit (nux::GetEventButton (button_flags));
34663485
3467 if (GetActionState () == ACTION_NONE) {3486 if (GetActionState () == ACTION_NONE) {
3468 _icon_mouse_down->MouseClick.emit (nux::GetEventButton (button_flags));3487 _icon_mouse_down->_shift_pressed=_shift_pressed;
3488 _icon_mouse_down->MouseClick.emit (nux::GetEventButton (button_flags));
3489 _shift_pressed=false;
3469 }3490 }
3470 }3491 }
34713492
34723493
=== modified file 'plugins/unityshell/src/Launcher.h'
--- plugins/unityshell/src/Launcher.h 2011-06-09 07:23:27 +0000
+++ plugins/unityshell/src/Launcher.h 2011-06-24 20:43:44 +0000
@@ -156,6 +156,7 @@
156 virtual void RecvMouseDownOutsideArea (int x, int y, unsigned long button_flags, unsigned long key_flags);156 virtual void RecvMouseDownOutsideArea (int x, int y, unsigned long button_flags, unsigned long key_flags);
157157
158 virtual void RecvKeyPressed (unsigned int key_sym, unsigned long key_code, unsigned long key_state);158 virtual void RecvKeyPressed (unsigned int key_sym, unsigned long key_code, unsigned long key_state);
159 virtual void RecvKeyReleased (unsigned int key_sym, unsigned long key_code, unsigned long key_state);
159160
160 virtual void RecvQuicklistOpened (QuicklistView *quicklist);161 virtual void RecvQuicklistOpened (QuicklistView *quicklist);
161 virtual void RecvQuicklistClosed (QuicklistView *quicklist);162 virtual void RecvQuicklistClosed (QuicklistView *quicklist);
@@ -424,6 +425,7 @@
424 bool _shortcuts_shown; 425 bool _shortcuts_shown;
425 bool _super_pressed;426 bool _super_pressed;
426 bool _keynav_activated;427 bool _keynav_activated;
428 bool _shift_pressed;
427 guint64 _latest_shortcut;429 guint64 _latest_shortcut;
428 430
429 BacklightMode _backlight_mode;431 BacklightMode _backlight_mode;
430432
=== modified file 'plugins/unityshell/src/LauncherIcon.cpp'
--- plugins/unityshell/src/LauncherIcon.cpp 2011-06-21 12:10:09 +0000
+++ plugins/unityshell/src/LauncherIcon.cpp 2011-06-24 20:43:44 +0000
@@ -60,6 +60,7 @@
60LauncherIcon::LauncherIcon(Launcher* launcher)60LauncherIcon::LauncherIcon(Launcher* launcher)
61{61{
62 _folding_angle = 0;62 _folding_angle = 0;
63 _shift_pressed=false;
63 _launcher = launcher;64 _launcher = launcher;
64 m_TooltipText = "blank";65 m_TooltipText = "blank";
6566
@@ -608,10 +609,17 @@
608609
609void LauncherIcon::RecvMouseClick (int button)610void LauncherIcon::RecvMouseClick (int button)
610{611{
611 if (button == 1)612 if (button == 1 && !_shift_pressed){
612 Activate ();613 Activate ();
613 else if (button == 2)614 }
614 OpenInstance ();615 else if (button == 1 && _shift_pressed){
616 OpenInstance ();
617 }
618 else if (button == 2){
619 OpenInstance ();
620 }
621
622 _shift_pressed=false;
615}623}
616624
617void LauncherIcon::HideTooltip ()625void LauncherIcon::HideTooltip ()
618626
=== modified file 'plugins/unityshell/src/LauncherIcon.h'
--- plugins/unityshell/src/LauncherIcon.h 2011-05-27 18:57:49 +0000
+++ plugins/unityshell/src/LauncherIcon.h 2011-06-24 20:43:44 +0000
@@ -234,6 +234,8 @@
234 bool _mouse_inside;234 bool _mouse_inside;
235 float _folding_angle;235 float _folding_angle;
236236
237 bool _shift_pressed;
238
237 nux::Tooltip *_tooltip;239 nux::Tooltip *_tooltip;
238 QuicklistView *_quicklist;240 QuicklistView *_quicklist;
239241