diff options
| author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2015-02-04 10:54:49 +0100 |
|---|---|---|
| committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2015-02-04 10:54:49 +0100 |
| commit | 3c084bab68fcd0ca675eefb7380e9d00e07015f3 (patch) | |
| tree | 049df1f96f45a7fcabdb862a03e629c79372ab74 /panel | |
| parent | 56e12fe4c9f76615ed49a5edd4934322d1698adf (diff) | |
PanelMenuView: verify that whether a maximized window is valid for us when moved/resized
(bzr r3899.2.64)
Diffstat (limited to 'panel')
| -rw-r--r-- | panel/PanelMenuView.cpp | 13 | ||||
| -rw-r--r-- | panel/PanelMenuView.h | 2 |
2 files changed, 7 insertions, 8 deletions
diff --git a/panel/PanelMenuView.cpp b/panel/PanelMenuView.cpp index 368312118..c26d981a7 100644 --- a/panel/PanelMenuView.cpp +++ b/panel/PanelMenuView.cpp @@ -1363,21 +1363,17 @@ bool PanelMenuView::UpdateActiveWindowPosition() void PanelMenuView::OnWindowMoved(Window xid) { - if (active_window() == xid) + if (!integrated_menus_ && active_window() == xid && UScreen::GetDefault()->GetMonitors().size() > 1) { /* When moving the active window, if the current panel is controlling * the active window, then we postpone the timeout function every movement * that we have, setting a longer timeout. - * Otherwise, if the moved window is not controlled by the current panel + * Otherwise, if the movedPanelMenuView::OnWindowMovedPanelMenuView::OnWindowMoved window is not controlled by the current panel * every few millisecond we check the new window position */ unsigned int timeout_length = 250; - if (we_control_active_) - { - sources_.Remove(WINDOW_MOVED_TIMEOUT); - } - else + if (!we_control_active_) { if (sources_.GetSource(WINDOW_MOVED_TIMEOUT)) return; @@ -1388,6 +1384,9 @@ void PanelMenuView::OnWindowMoved(Window xid) auto cb_func = sigc::mem_fun(this, &PanelMenuView::UpdateActiveWindowPosition); sources_.AddTimeout(timeout_length, cb_func, WINDOW_MOVED_TIMEOUT); } + + if (std::find(maximized_wins_.begin(), maximized_wins_.end(), xid) != maximized_wins_.end()) + UpdateMaximizedWindow(); } bool PanelMenuView::IsWindowUnderOurControl(Window xid) const diff --git a/panel/PanelMenuView.h b/panel/PanelMenuView.h index b7855b906..d5c288c9d 100644 --- a/panel/PanelMenuView.h +++ b/panel/PanelMenuView.h @@ -163,7 +163,7 @@ private: void ActivateIntegratedMenus(nux::Point const&); - menu::Manager::Ptr const& menu_manager_; + menu::Manager::Ptr menu_manager_; glib::Object<BamfMatcher> matcher_; nux::TextureLayer* title_layer_; |
