+
+ // finally, user specified disabled decorations are applied to subtract
+ // decorations
+ if (_disabled_decorations & Decor_Titlebar)
+ _decorations &= ~Decor_Titlebar;
+ if (_disabled_decorations & Decor_Handle)
+ _decorations &= ~Decor_Handle;
+ if (_disabled_decorations & Decor_Border)
+ _decorations &= ~Decor_Border;
+ if (_disabled_decorations & Decor_Iconify)
+ _decorations &= ~Decor_Iconify;
+ if (_disabled_decorations & Decor_Maximize)
+ _decorations &= ~Decor_Maximize;
+ if (_disabled_decorations & Decor_AllDesktops)
+ _decorations &= ~Decor_AllDesktops;
+ if (_disabled_decorations & Decor_Close)
+ _decorations &= ~Decor_Close;
+
+ // You can't shade without a titlebar
+ if (!(_decorations & Decor_Titlebar))
+ _functions &= ~Func_Shade;
+
+ changeAllowedActions();
+
+ if (frame) {
+ frame->adjustSize(); // change the decors on the frame
+ frame->adjustPosition(); // with more/less decorations, we may need to be
+ // moved
+ }
+}
+
+
+void Client::getMwmHints()
+{
+ unsigned long num = MwmHints::elements;
+ unsigned long *hints;
+
+ _mwmhints.flags = 0; // default to none
+
+ if (!otk::Property::get(_window, otk::Property::atoms.motif_wm_hints,
+ otk::Property::atoms.motif_wm_hints, &num,
+ (unsigned long **)&hints))
+ return;
+
+ if (num >= MwmHints::elements) {
+ // retrieved the hints
+ _mwmhints.flags = hints[0];
+ _mwmhints.functions = hints[1];
+ _mwmhints.decorations = hints[2];
+ }
+