| Index: ui/base/x/x11_util.cc
|
| diff --git a/ui/base/x/x11_util.cc b/ui/base/x/x11_util.cc
|
| index 8560f1bb594b79dbcf6d23f205aeef34b2382ca8..c9a8b89e29b466467854feefe1426a56e57bd50b 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 =
|
| @@ -855,6 +886,13 @@ bool SetIntArrayProperty(XID window,
|
| return !err_tracker.FoundNewError();
|
| }
|
|
|
| +bool SetAtomProperty(XID window,
|
| + const std::string& name,
|
| + const std::string& type,
|
| + Atom value) {
|
| + return SetAtomArrayProperty(window, name, type, std::vector<Atom>(1, value));
|
| +}
|
| +
|
| bool SetAtomArrayProperty(XID window,
|
| const std::string& name,
|
| const std::string& type,
|
|
|