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

Unified Diff: ui/base/x/x11_util.cc

Issue 320713004: Update panel layout immediately after the user has finished resizing a panel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 6 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/base/x/x11_util.h ('k') | ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/x/x11_util.cc
diff --git a/ui/base/x/x11_util.cc b/ui/base/x/x11_util.cc
index e51faaaf940c2de31dff802f74a0bef6e3e348e5..d892cb62bf4788aef057075fbadaee77968aa475 100644
--- a/ui/base/x/x11_util.cc
+++ b/ui/base/x/x11_util.cc
@@ -463,6 +463,37 @@ void HideHostCursor() {
return invisible_cursor;
}
+void SetUseOSWindowFrame(XID window, bool use_os_window_frame) {
+ // This data structure represents additional hints that we send to the window
+ // manager and has a direct lineage back to Motif, which defined this de facto
+ // standard. This struct doesn't seem 64-bit safe though, but it's what GDK
+ // does.
+ typedef struct {
+ unsigned long flags;
+ unsigned long functions;
+ unsigned long decorations;
+ long input_mode;
+ unsigned long status;
+ } MotifWmHints;
+
+ MotifWmHints motif_hints;
+ memset(&motif_hints, 0, sizeof(motif_hints));
+ // Signals that the reader of the _MOTIF_WM_HINTS property should pay
+ // attention to the value of |decorations|.
+ motif_hints.flags = (1L << 1);
+ motif_hints.decorations = use_os_window_frame ? 1 : 0;
+
+ ::Atom hint_atom = GetAtom("_MOTIF_WM_HINTS");
+ XChangeProperty(gfx::GetXDisplay(),
+ window,
+ hint_atom,
+ hint_atom,
+ 32,
+ PropModeReplace,
+ reinterpret_cast<unsigned char*>(&motif_hints),
+ sizeof(MotifWmHints)/sizeof(long));
+}
+
bool IsShapeExtensionAvailable() {
int dummy;
static bool is_shape_available =
« no previous file with comments | « ui/base/x/x11_util.h ('k') | ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698