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

Unified Diff: ui/gfx/screen_gtk.cc

Issue 10255020: Get the default device scale factor from monitor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updated comment Created 8 years, 8 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
« no previous file with comments | « ui/gfx/screen_android.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/screen_gtk.cc
diff --git a/ui/gfx/screen_gtk.cc b/ui/gfx/screen_gtk.cc
index 1ae82618d551379e00c220f7bccf9efa168e1014..3de2d3e8d1b019a99a14479129e7952b97f37db3 100644
--- a/ui/gfx/screen_gtk.cc
+++ b/ui/gfx/screen_gtk.cc
@@ -57,7 +57,7 @@ gfx::Rect NativePrimaryMonitorBounds() {
gfx::Rect GetMonitorAreaNearestWindow(gfx::NativeView view) {
GdkScreen* screen = gdk_screen_get_default();
gint monitor_num = 0;
- if (view) {
+ if (view && GTK_IS_WINDOW(view)) {
GtkWidget* top_level = gtk_widget_get_toplevel(view);
DCHECK(GTK_IS_WINDOW(top_level));
GtkWindow* window = GTK_WINDOW(top_level);
« no previous file with comments | « ui/gfx/screen_android.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698