diff options
| author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2014-03-21 05:49:06 +0100 |
|---|---|---|
| committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2014-03-21 05:49:06 +0100 |
| commit | 29d350824f6c1dc9b32664ec9689ed0bfedbb86d (patch) | |
| tree | f169a152c9f4a64f68247b9ef0a08dcc0e6f3b83 /plugins/unityshell | |
| parent | 2ca1cc5bd2c45f38b4fa0c1aac037f593abed832 (diff) | |
| parent | 3477ced1fc1be687c3d5735bb6f8f0724b14b3aa (diff) | |
Merging with trunk
(bzr r3725.7.24)
Diffstat (limited to 'plugins/unityshell')
| -rw-r--r-- | plugins/unityshell/src/unityshell.cpp | 45 | ||||
| -rw-r--r-- | plugins/unityshell/src/unityshell.h | 2 | ||||
| -rw-r--r-- | plugins/unityshell/unityshell.xml.in | 6 |
3 files changed, 39 insertions, 14 deletions
diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index 7dd6bb267..bcc9b7c06 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -380,6 +380,7 @@ UnityScreen::UnityScreen(CompScreen* screen) optionSetLauncherCaptureMouseNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2)); optionSetScrollInactiveIconsNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2)); + optionSetLauncherMinimizeWindowNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2)); ubus_manager_.RegisterInterest(UBUS_LAUNCHER_START_KEY_NAV, sigc::mem_fun(this, &UnityScreen::OnLauncherStartKeyNav)); @@ -930,7 +931,6 @@ void UnityScreen::DrawPanelUnderDash() bool UnityScreen::forcePaintOnTop() { return !allowWindowPaint || - lockscreen_controller_->IsLocked() || ((switcher_controller_->Visible() || WindowManager::Default().IsExpoActive()) && !fullscreen_windows_.empty () && (!(screen->grabbed () && !screen->otherGrabExist (NULL)))); @@ -2794,7 +2794,9 @@ bool UnityWindow::glPaint(const GLWindowPaintAttrib& attrib, * fully covers the shell on its output. It does not include regular windows * stacked above the shell like DnD icons or Onboard etc. */ - if (G_UNLIKELY(is_nux_window_)) + if (G_UNLIKELY(is_nux_window_) && + (!uScreen->lockscreen_controller_->IsLocked() || + uScreen->lockscreen_controller_->Opacity() != 1.0f)) { if (mask & PAINT_WINDOW_OCCLUSION_DETECTION_MASK) { @@ -2851,8 +2853,9 @@ bool UnityWindow::glPaint(const GLWindowPaintAttrib& attrib, if (uScreen->lockscreen_controller_->IsLocked()) { - if (window->type() != CompWindowTypePopupMenuMask || - !uScreen->lockscreen_controller_->HasOpenMenu()) + if ((window->type() != CompWindowTypePopupMenuMask || + !uScreen->lockscreen_controller_->HasOpenMenu()) && + !window->minimized() && window->resName() != "onboard") { // For some reasons PAINT_WINDOW_NO_CORE_INSTANCE_MASK doesn't work here // (well, it works too much, as it applies to menus too), so we need @@ -3008,6 +3011,9 @@ bool UnityWindow::glDraw(const GLMatrix& matrix, } } + if (uScreen->lockscreen_controller_->IsLocked()) + draw_panel_shadow = DrawPanelShadow::NO; + if (draw_panel_shadow == DrawPanelShadow::BELOW_WINDOW) uScreen->paintPanelShadow(region); @@ -3401,6 +3407,9 @@ void UnityScreen::optionChanged(CompOption* opt, UnityshellOptions::Options num) case UnityshellOptions::ScrollInactiveIcons: launcher_options->scroll_inactive_icons = optionGetScrollInactiveIcons(); break; + case UnityshellOptions::LauncherMinimizeWindow: + launcher_options->minimize_window_on_click = optionGetLauncherMinimizeWindow(); + break; case UnityshellOptions::BackgroundColor: { auto override_color = NuxColorFromCompizColor(optionGetBackgroundColor()); @@ -3709,16 +3718,7 @@ bool UnityScreen::layoutSlotsAndAssignWindows() void UnityScreen::OnDashRealized() { - /* stack any windows named "onboard" above us */ - for (CompWindow *w : screen->windows ()) - { - if (w->resName() == "onboard") - { - Window xid = dash_controller_->window()->GetInputWindowId(); - XSetTransientForHint (screen->dpy(), w->id(), xid); - w->raise (); - } - } + RaiseOSK(); } void UnityScreen::LockscreenRequested() @@ -3734,6 +3734,22 @@ void UnityScreen::LockscreenRequested() } launcher_controller_->ClearTooltips(); + + RaiseOSK(); +} + +void UnityScreen::RaiseOSK() +{ + /* stack any windows named "onboard" above us */ + for (CompWindow *w : screen->windows ()) + { + if (w->resName() == "onboard") + { + Window xid = dash_controller_->window()->GetInputWindowId(); + XSetTransientForHint (screen->dpy(), w->id(), xid); + w->raise (); + } + } } /* Start up the launcher */ @@ -3827,6 +3843,7 @@ void UnityScreen::initLauncher() }); launcher_controller_->options()->scroll_inactive_icons = optionGetScrollInactiveIcons(); + launcher_controller_->options()->minimize_window_on_click = optionGetLauncherMinimizeWindow(); ScheduleRelayout(0); } diff --git a/plugins/unityshell/src/unityshell.h b/plugins/unityshell/src/unityshell.h index 15833e687..4d1c48a7a 100644 --- a/plugins/unityshell/src/unityshell.h +++ b/plugins/unityshell/src/unityshell.h @@ -278,6 +278,8 @@ private: void OnDashRealized (); + void RaiseOSK(); + void OnLauncherStartKeyNav(GVariant* data); void OnLauncherEndKeyNav(GVariant* data); void OnSwitcherDetailChanged(bool detail); diff --git a/plugins/unityshell/unityshell.xml.in b/plugins/unityshell/unityshell.xml.in index 86ab214b5..58b382303 100644 --- a/plugins/unityshell/unityshell.xml.in +++ b/plugins/unityshell/unityshell.xml.in @@ -362,6 +362,12 @@ <default>true</default> </option> + <option name="launcher_minimize_window" type="bool"> + <_short>Minimize Single Window Applications (Unsupported)</_short> + <_long>Allows minimizing a single windowed application by clicking on its Launcher icon.</_long> + <default>false</default> + </option> + <option name="edge_responsiveness" type="float"> <_short>Launcher Reveal Edge Responsiveness</_short> <_long>A conglomerate setting that modifies the overall responsiveness of the Launcher reveal.</_long> |
