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

Unified Diff: chrome/browser/ui/gtk/gtk_window_util.cc

Issue 10871087: GTK implementation of remembering platform app window geometry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix last few comments Created 8 years, 4 months 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
Index: chrome/browser/ui/gtk/gtk_window_util.cc
diff --git a/chrome/browser/ui/gtk/gtk_window_util.cc b/chrome/browser/ui/gtk/gtk_window_util.cc
index 569bc1da12b741479ffac79fb559ffc0bd114907..8c00557513da7787b5aabbf02e1f605a576c5a27 100644
--- a/chrome/browser/ui/gtk/gtk_window_util.cc
+++ b/chrome/browser/ui/gtk/gtk_window_util.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/ui/gtk/gtk_window_util.h"
#include <dlfcn.h>
+#include "chrome/browser/ui/base_window.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
@@ -183,4 +184,14 @@ void SetWindowCustomClass(GtkWindow* window, const std::string& wmclass) {
gtk_window_set_role(window, wmclass.c_str());
}
+void UpdateWindowPosition(BaseWindow* window,
+ gfx::Rect* bounds,
+ gfx::Rect* restored_bounds) {
+ gint x, y;
+ gtk_window_get_position(window->GetNativeWindow(), &x, &y);
+ (*bounds).set_origin(gfx::Point(x, y));
+ if (!window->IsFullscreen() && !window->IsMaximized())
+ *restored_bounds = *bounds;
+}
+
} // namespace gtk_window_util

Powered by Google App Engine
This is Rietveld 408576698