~unity-team/unity/trunk

« back to all changes in this revision

Viewing changes to plugins/unityshell/src/unityshell.cpp

  • Committer: Tarmac
  • Author(s): Nick Dedekind
  • Date: 2012-09-12 18:00:22 UTC
  • mfrom: (2676.3.6 unity.other)
  • Revision ID: tarmac-20120912180022-xgwv5c2p6fck1dun
Fixed dash dismissal when changing focus to a window on monitor external to that of the dash. (LP#923657)
Improved panel update speed when opening dash. (LP#1044086). Fixes: https://bugs.launchpad.net/bugs/923657, https://bugs.launchpad.net/bugs/1044086. Approved by Brandon Schaefer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
358
358
       g_variant_get(data, UBUS_OVERLAY_FORMAT_STRING,
359
359
                    &overlay_identity, &can_maximise, &overlay_monitor);
360
360
 
361
 
       dash_monitor_ = overlay_monitor;
 
361
       overlay_monitor_ = overlay_monitor;
362
362
 
363
363
       RaiseInputWindows();
364
364
     });
569
569
    i++;
570
570
  }
571
571
 
572
 
  if (!(launcher_controller_->IsOverlayOpen() && current_monitor == dash_monitor_)
 
572
  if (!(launcher_controller_->IsOverlayOpen() && current_monitor == overlay_monitor_)
573
573
      && panel_controller_->opacity() > 0.0f)
574
574
  {
575
575
    foreach(GLTexture * tex, _shadow_texture)
1420
1420
        if (CompWindow *w = screen->findWindow(ss->getSelectedWindow()))
1421
1421
          skip_other_plugins = UnityWindow::get(w)->handleEvent(event);
1422
1422
      }
1423
 
 
 
1423
      if (launcher_controller_->IsOverlayOpen())
 
1424
      {
 
1425
        int monitor_with_mouse = UScreen::GetDefault()->GetMonitorWithMouse();
 
1426
        if (overlay_monitor_ != monitor_with_mouse)
 
1427
        {
 
1428
          dash_controller_->HideDash(false);
 
1429
          hud_controller_->HideHud(false);
 
1430
        }
 
1431
      }
1424
1432
      break;
1425
1433
    case ButtonRelease:
1426
1434
      if (switcher_controller_ && switcher_controller_->Visible())
2560
2568
    UnityScreen* us = UnityScreen::get(screen);
2561
2569
    CompWindow *lw;
2562
2570
 
2563
 
    if (us->launcher_controller_->IsOverlayOpen())
 
2571
    // can't rely on launcher->IsOverlayVisible on focus change (because ubus is async close on focus change.)
 
2572
    if (us && (us->dash_controller_->IsVisible() || us->hud_controller_->IsVisible()))
2564
2573
    {
2565
2574
      lw = screen->findWindow(us->launcher_controller_->LauncherWindowId(0));
2566
2575
      lw->moveInputFocusTo();