Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: chrome/browser/ui/panels/panel_browser_window_gtk.cc

Issue 8595003: Have panels respond to changes in work area on Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile linux_view and chromeos. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/panels/panel_browser_window_gtk.h ('k') | ui/base/x/active_window_watcher_x.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/panels/panel_browser_window_gtk.cc
diff --git a/chrome/browser/ui/panels/panel_browser_window_gtk.cc b/chrome/browser/ui/panels/panel_browser_window_gtk.cc
index c9342e02c86ccdf031a714d97855f9a16d7598d2..d934806ab45babbb35b989d62c7eeaeb76328d75 100644
--- a/chrome/browser/ui/panels/panel_browser_window_gtk.cc
+++ b/chrome/browser/ui/panels/panel_browser_window_gtk.cc
@@ -13,6 +13,7 @@
#include "content/public/browser/notification_service.h"
#include "ui/base/animation/slide_animation.h"
#include "ui/base/dragdrop/gtk_dnd_util.h"
+#include "ui/base/x/work_area_watcher_x.h"
namespace {
@@ -70,6 +71,7 @@ PanelBrowserWindowGtk::~PanelBrowserWindowGtk() {
DestroyDragWidget();
}
panel_->OnNativePanelClosed();
+ ui::WorkAreaWatcherX::RemoveObserver(this);
}
void PanelBrowserWindowGtk::Init() {
@@ -92,6 +94,8 @@ void PanelBrowserWindowGtk::Init() {
G_CALLBACK(OnTitlebarButtonPressEventThunk), this);
g_signal_connect(titlebar_widget(), "button-release-event",
G_CALLBACK(OnTitlebarButtonReleaseEventThunk), this);
+
+ ui::WorkAreaWatcherX::AddObserver(this);
}
bool PanelBrowserWindowGtk::GetWindowEdge(int x, int y, GdkWindowEdge* edge) {
@@ -225,6 +229,10 @@ BrowserWindowGtk::TitleDecoration PanelBrowserWindowGtk::GetWindowTitle(
}
}
+void PanelBrowserWindowGtk::WorkAreaChanged() {
+ panel_->manager()->OnDisplayChanged();
+}
+
void PanelBrowserWindowGtk::ShowPanel() {
Show();
}
« no previous file with comments | « chrome/browser/ui/panels/panel_browser_window_gtk.h ('k') | ui/base/x/active_window_watcher_x.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698