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

Unified Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h

Issue 924853002: linux/x11: Fix setting window bounds in High DPI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 10 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: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
index fbd18d631732a3a651f3d3a40dcd1453254e134c..f32de5bab610808ec4cf5c7344a871cba12f7a5e 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
@@ -147,6 +147,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
void SizeConstraintsChanged() override;
// Overridden from aura::WindowTreeHost:
+ gfx::Transform GetRootTransform() const override;
ui::EventSource* GetEventSource() override;
gfx::AcceleratedWidget GetAcceleratedWidget() override;
void Show() override;
@@ -243,6 +244,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
void DelayedResize(const gfx::Size& size);
+ gfx::Rect GetWorkAreaBoundsInPixels() const;
+ gfx::Rect ToDIPRect(const gfx::Rect& rect_in_pixels) const;
+ gfx::Rect ToPixelRect(const gfx::Rect& rect_in_dip) const;
+
// X11 things
// The display and the native X window hosting the root window.
XDisplay* xdisplay_;
@@ -257,7 +262,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
bool window_mapped_;
// The bounds of |xwindow_|.
- gfx::Rect bounds_;
+ gfx::Rect bounds_in_pixels_;
// Whenever the bounds are set, we keep the previous set of bounds around so
// we can have a better chance of getting the real |restored_bounds_|. Window

Powered by Google App Engine
This is Rietveld 408576698