From 9051f39e39bfb3bf7dacc9a19ef209dafff8c655 Mon Sep 17 00:00:00 2001 From: Brandon Schaefer Date: Wed, 15 Jan 2014 15:00:32 -0800 Subject: * Move panel::Style::panel_height over to a function PanelHeight(int monitor) (bzr r3625.1.1) --- plugins/unityshell/src/unityshell.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins') diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index 2810c7fa6..87655edd2 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -609,7 +609,7 @@ void UnityScreen::FillShadowRectForOutput(CompRect& shadowRect, CompOutput const if (_shadow_texture.empty ()) return; - float panel_h = static_cast(panel_style_.panel_height); + float panel_h = static_cast(panel_style_.PanelHeight()); float shadowX = output.x(); float shadowY = output.y() + panel_h; float shadowWidth = output.width(); @@ -889,7 +889,7 @@ void UnityScreen::DrawPanelUnderDash() nux::TexCoordXForm texxform; texxform.SetWrap(nux::TEXWRAP_REPEAT, nux::TEXWRAP_CLAMP); - int panel_height = panel_style_.panel_height; + int panel_height = panel_style_.PanelHeight(); auto const& texture = panel_style_.GetBackground()->GetDeviceTexture(); graphics_engine->QRP_GLSL_1Tex(0, 0, screen->width(), panel_height, texture, texxform, nux::color::White); } @@ -2844,7 +2844,7 @@ bool UnityWindow::glDraw(const GLMatrix& matrix, { auto const& output = uScreen->screen->currentOutputDev(); - if (window->y() - window->border().top < output.y() + uScreen->panel_style_.panel_height) + if (window->y() - window->border().top < output.y() + uScreen->panel_style_.PanelHeight()) { draw_panel_shadow = DrawPanelShadow::OVER_WINDOW; } @@ -3505,7 +3505,7 @@ void UnityScreen::initLauncher() hud_controller_->launcher_width = launcher_width; dash_controller_->launcher_width = launcher_width; panel_controller_->launcher_width = launcher_width; - shortcut_controller_->SetAdjustment(launcher_width, panel_style_.panel_height); + shortcut_controller_->SetAdjustment(launcher_width, panel_style_.PanelHeight()); }); ScheduleRelayout(0); -- cgit v1.2.3 From 890085718db758955e78e86fa1b457442e33d89d Mon Sep 17 00:00:00 2001 From: Brandon Schaefer Date: Thu, 16 Jan 2014 10:17:49 -0800 Subject: * Move to PanelHeight inside panel::Style::GetBackground() * Remove unused function pane::Style::GetHomeButtons() * Filled in a couple more PanelHeight(monitor) calls (bzr r3625.1.4) --- plugins/unityshell/src/unityshell.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index 87655edd2..140c591f6 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -889,8 +889,8 @@ void UnityScreen::DrawPanelUnderDash() nux::TexCoordXForm texxform; texxform.SetWrap(nux::TEXWRAP_REPEAT, nux::TEXWRAP_CLAMP); - int panel_height = panel_style_.PanelHeight(); - auto const& texture = panel_style_.GetBackground()->GetDeviceTexture(); + int panel_height = panel_style_.PanelHeight(overlay_monitor_); + auto const& texture = panel_style_.GetBackground(overlay_monitor_)->GetDeviceTexture(); graphics_engine->QRP_GLSL_1Tex(0, 0, screen->width(), panel_height, texture, texxform, nux::color::White); } @@ -2843,8 +2843,9 @@ bool UnityWindow::glDraw(const GLMatrix& matrix, !(window->type() & CompWindowTypeFullscreenMask)) { auto const& output = uScreen->screen->currentOutputDev(); + int monitor = window->outputDevice(); - if (window->y() - window->border().top < output.y() + uScreen->panel_style_.PanelHeight()) + if (window->y() - window->border().top < output.y() + uScreen->panel_style_.PanelHeight(monitor)) { draw_panel_shadow = DrawPanelShadow::OVER_WINDOW; } -- cgit v1.2.3 From 6765ba133164e727cc8955db23278b333b5c6ed7 Mon Sep 17 00:00:00 2001 From: Brandon Schaefer Date: Thu, 16 Jan 2014 10:36:38 -0800 Subject: * This causes some intersting problems if the panel height is different on 1 monitor. ... unityshell.cpp is going to need some love to get this working nicely. (bzr r3625.1.5) --- plugins/unityshell/src/unityshell.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'plugins') diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index 140c591f6..87655edd2 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -889,8 +889,8 @@ void UnityScreen::DrawPanelUnderDash() nux::TexCoordXForm texxform; texxform.SetWrap(nux::TEXWRAP_REPEAT, nux::TEXWRAP_CLAMP); - int panel_height = panel_style_.PanelHeight(overlay_monitor_); - auto const& texture = panel_style_.GetBackground(overlay_monitor_)->GetDeviceTexture(); + int panel_height = panel_style_.PanelHeight(); + auto const& texture = panel_style_.GetBackground()->GetDeviceTexture(); graphics_engine->QRP_GLSL_1Tex(0, 0, screen->width(), panel_height, texture, texxform, nux::color::White); } @@ -2843,9 +2843,8 @@ bool UnityWindow::glDraw(const GLMatrix& matrix, !(window->type() & CompWindowTypeFullscreenMask)) { auto const& output = uScreen->screen->currentOutputDev(); - int monitor = window->outputDevice(); - if (window->y() - window->border().top < output.y() + uScreen->panel_style_.PanelHeight(monitor)) + if (window->y() - window->border().top < output.y() + uScreen->panel_style_.PanelHeight()) { draw_panel_shadow = DrawPanelShadow::OVER_WINDOW; } -- cgit v1.2.3 From ac242faa80212cd96670b0e36ce34b53989c724c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Mon, 10 Feb 2014 23:49:26 +0100 Subject: UnityScreen: don't paint shadow over windows if using integrated_menus (bzr r3566.5.369) --- plugins/unityshell/src/unityshell.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index 1a238959f..bf3e055e7 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -2833,7 +2833,7 @@ bool UnityWindow::glDraw(const GLMatrix& matrix, } else { - if (window->id() == active_window) + if (window->id() == active_window || decoration::Style::Get()->integrated_menus()) { draw_panel_shadow = DrawPanelShadow::BELOW_WINDOW; uScreen->is_desktop_active_ = false; -- cgit v1.2.3 From fad51c86e0e2ea86cbe8c5d4c3d970ee9dcd6a27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 13 Feb 2014 01:51:59 +0100 Subject: DecorationsManager: Add menu::Manager as construction parameter and use it We now have proper keyboard activation for indicator menus, and also we share the same indicator-entries and dbus indicators with all the panels. (bzr r3566.5.394) --- plugins/unityshell/src/unityshell.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index c84b9b1e4..5cde27206 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -150,7 +150,7 @@ UnityScreen::UnityScreen(CompScreen* screen) , cScreen(CompositeScreen::get(screen)) , gScreen(GLScreen::get(screen)) , menus_(std::make_shared(std::make_shared(), std::make_shared())) - , deco_manager_(std::make_shared()) + , deco_manager_(std::make_shared(menus_)) , debugger_(this) , needsRelayout(false) , super_keypressed_(false) -- cgit v1.2.3 From 6a272589fd4559ccecc0b1b1eaa48693da2e0d34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 13 Feb 2014 02:27:48 +0100 Subject: UnityShell: disable menu_show on menu::Manager before showing the Alt+Tab (bzr r3566.5.396) --- plugins/unityshell/src/unityshell.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins') diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index 5cde27206..1af48d93e 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -2158,6 +2158,7 @@ bool UnityScreen::altTabInitiateCommon(CompAction* action, switcher::ShowMode sh show_mode = switcher::ShowMode::CURRENT_VIEWPORT; } + menus_->show_menus = false; SetUpAndShowSwitcher(show_mode); return true; -- cgit v1.2.3 From 379ce44df59cc77f1bffc25185eb00ce627249cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 13 Feb 2014 06:47:03 +0100 Subject: UnitySettings: add lim options and use them in DecorationsMenuEntry (bzr r3566.5.407) --- plugins/unityshell/src/unityshell.cpp | 2 +- plugins/unityshell/src/unityshell.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index 1af48d93e..44a9cca5b 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -252,7 +252,7 @@ UnityScreen::UnityScreen(CompScreen* screen) renderer.find("on softpipe") != std::string::npos || (getenv("UNITY_LOW_GFX_MODE") != NULL && atoi(getenv("UNITY_LOW_GFX_MODE")) == 1)) { - Settings::Instance().SetLowGfxMode(true); + unity_settings_.SetLowGfxMode(true); } #endif diff --git a/plugins/unityshell/src/unityshell.h b/plugins/unityshell/src/unityshell.h index bbb94ece4..cbb8fe26e 100644 --- a/plugins/unityshell/src/unityshell.h +++ b/plugins/unityshell/src/unityshell.h @@ -303,7 +303,7 @@ private: std::unique_ptr tick_source_; std::unique_ptr animation_controller_; - Settings dash_settings_; + Settings unity_settings_; dash::Style dash_style_; panel::Style panel_style_; FontSettings font_settings_; -- cgit v1.2.3 From f6c7cae34d0531745efdf436f24248e1f04c4f4c Mon Sep 17 00:00:00 2001 From: Brandon Schaefer Date: Sun, 16 Feb 2014 19:44:28 -0800 Subject: * Update more with monitors checks for PanelHeight. A couple moure to go. * Still need to update the window buttons correctly when different monitor sizes. (bzr r3566.6.7) --- plugins/unityshell/src/unityshell.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index fbab6f113..11fde79bf 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -609,7 +609,9 @@ void UnityScreen::FillShadowRectForOutput(CompRect& shadowRect, CompOutput const if (_shadow_texture.empty ()) return; - float panel_h = static_cast(panel_style_.PanelHeight()); + nux::Geometry const& geo = {output.x(), output.y(), output.width(), output.height()}; + int monitor = PluginAdapter::Default().MonitorGeometryIn(geo); + float panel_h = static_cast(panel_style_.PanelHeight(monitor)); float shadowX = output.x(); float shadowY = output.y() + panel_h; float shadowWidth = output.width(); -- cgit v1.2.3 From 3e630173857cf54c548ac14605f7e6b7063a1a88 Mon Sep 17 00:00:00 2001 From: Brandon Schaefer Date: Mon, 17 Feb 2014 20:47:43 -0800 Subject: * Cleaned up parts in *EntryView* * Cleaned up bits that use PanelHeight, (Missed some defaulted calls) (bzr r3566.6.12) --- plugins/unityshell/src/unityshell.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index 7494b43ae..2ca1a32a5 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -614,8 +614,7 @@ void UnityScreen::FillShadowRectForOutput(CompRect& shadowRect, CompOutput const if (_shadow_texture.empty ()) return; - nux::Geometry const& geo = {output.x(), output.y(), output.width(), output.height()}; - int monitor = PluginAdapter::Default().MonitorGeometryIn(geo); + int monitor = PluginAdapter::Default().MonitorGeometryIn(NuxGeometryFromCompRect(output)); float panel_h = static_cast(panel_style_.PanelHeight(monitor)); float shadowX = output.x(); float shadowY = output.y() + panel_h; @@ -2869,6 +2868,8 @@ bool UnityWindow::glDraw(const GLMatrix& matrix, } else { + WindowManager& wm = WindowManager::Default(); + if (window->id() == active_window) { draw_panel_shadow = DrawPanelShadow::BELOW_WINDOW; @@ -2879,8 +2880,9 @@ bool UnityWindow::glDraw(const GLMatrix& matrix, !(window->type() & CompWindowTypeFullscreenMask)) { auto const& output = uScreen->screen->currentOutputDev(); + int monitor = wm.MonitorGeometryIn(NuxGeometryFromCompRect(output)); - if (window->y() - window->border().top < output.y() + uScreen->panel_style_.PanelHeight()) + if (window->y() - window->border().top < output.y() + uScreen->panel_style_.PanelHeight(monitor)) { draw_panel_shadow = DrawPanelShadow::OVER_WINDOW; } -- cgit v1.2.3 From 2cdd6a4ebd6228fabe3f34346bfbbd08cff280da Mon Sep 17 00:00:00 2001 From: Brandon Schaefer Date: Tue, 18 Feb 2014 10:27:30 -0800 Subject: * Returns a & and use a & when dealing with EMConverters * Fix signal getting problems (bzr r3566.6.13) --- plugins/unityshell/src/unityshell.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index 2ca1a32a5..c9c4fe155 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -894,6 +894,8 @@ void UnityScreen::DrawPanelUnderDash() nux::TexCoordXForm texxform; texxform.SetWrap(nux::TEXWRAP_REPEAT, nux::TEXWRAP_CLAMP); + + // FIXME Change to paint per monitor vs all at once int panel_height = panel_style_.PanelHeight(); auto const& texture = panel_style_.GetBackground()->GetDeviceTexture(); graphics_engine->QRP_GLSL_1Tex(0, 0, screen->width(), panel_height, texture, texxform, nux::color::White); @@ -2868,8 +2870,6 @@ bool UnityWindow::glDraw(const GLMatrix& matrix, } else { - WindowManager& wm = WindowManager::Default(); - if (window->id() == active_window) { draw_panel_shadow = DrawPanelShadow::BELOW_WINDOW; @@ -2879,6 +2879,7 @@ bool UnityWindow::glDraw(const GLMatrix& matrix, !(window->state() & CompWindowStateFullscreenMask) && !(window->type() & CompWindowTypeFullscreenMask)) { + WindowManager& wm = WindowManager::Default(); auto const& output = uScreen->screen->currentOutputDev(); int monitor = wm.MonitorGeometryIn(NuxGeometryFromCompRect(output)); -- cgit v1.2.3