[MPlayer-cvslog] r35792 - trunk/gui/wm/ws.c

ib subversion at mplayerhq.hu
Sat Jan 19 13:53:15 CET 2013


Author: ib
Date: Sat Jan 19 13:53:14 2013
New Revision: 35792

Log:
Cosmetic: Relocate wsWindowDecoration().

Modified:
   trunk/gui/wm/ws.c

Modified: trunk/gui/wm/ws.c
==============================================================================
--- trunk/gui/wm/ws.c	Sat Jan 19 13:45:14 2013	(r35791)
+++ trunk/gui/wm/ws.c	Sat Jan 19 13:53:14 2013	(r35792)
@@ -783,6 +783,38 @@ static void wsSizeHint(wsWindow *win)
     XSetWMNormalHints(wsDisplay, win->WindowID, &size);
 }
 
+void wsWindowDecoration(wsWindow *win)
+{
+    Atom wsMotifHints;
+    struct {
+        unsigned long flags;
+        unsigned long functions;
+        unsigned long decorations;
+        long input_mode;
+        unsigned long status;
+    } wsMotifWmHints;
+
+    wsMotifHints = XInternAtom(wsDisplay, "_MOTIF_WM_HINTS", 0);
+
+    if (wsMotifHints == None)
+        return;
+
+    memset(&wsMotifWmHints, 0, sizeof(wsMotifWmHints));
+    wsMotifWmHints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS;
+
+    if (win->Decoration) {
+        wsMotifWmHints.functions = MWM_FUNC_MOVE | MWM_FUNC_CLOSE | MWM_FUNC_MINIMIZE | MWM_FUNC_MAXIMIZE;
+
+        if (!(win->Property & wsMinSize) || !(win->Property & wsMaxSize))
+            wsMotifWmHints.functions |= MWM_FUNC_RESIZE;
+
+        wsMotifWmHints.decorations = MWM_DECOR_ALL;
+    }
+
+    XChangeProperty(wsDisplay, win->WindowID, wsMotifHints, wsMotifHints, 32,
+                    PropModeReplace, (unsigned char *)&wsMotifWmHints, 5);
+}
+
 /**
  * @brief Wait until a window is mapped if its property requires it.
  *
@@ -1001,38 +1033,6 @@ void wsWindowDestroy(wsWindow *win)
 #endif
 }
 
-void wsWindowDecoration(wsWindow *win)
-{
-    Atom wsMotifHints;
-    struct {
-        unsigned long flags;
-        unsigned long functions;
-        unsigned long decorations;
-        long input_mode;
-        unsigned long status;
-    } wsMotifWmHints;
-
-    wsMotifHints = XInternAtom(wsDisplay, "_MOTIF_WM_HINTS", 0);
-
-    if (wsMotifHints == None)
-        return;
-
-    memset(&wsMotifWmHints, 0, sizeof(wsMotifWmHints));
-    wsMotifWmHints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS;
-
-    if (win->Decoration) {
-        wsMotifWmHints.functions = MWM_FUNC_MOVE | MWM_FUNC_CLOSE | MWM_FUNC_MINIMIZE | MWM_FUNC_MAXIMIZE;
-
-        if (!(win->Property & wsMinSize) || !(win->Property & wsMaxSize))
-            wsMotifWmHints.functions |= MWM_FUNC_RESIZE;
-
-        wsMotifWmHints.decorations = MWM_DECOR_ALL;
-    }
-
-    XChangeProperty(wsDisplay, win->WindowID, wsMotifHints, wsMotifHints, 32,
-                    PropModeReplace, (unsigned char *)&wsMotifWmHints, 5);
-}
-
 void wsWindowShape(wsWindow *win, char *data)
 {
 #ifdef CONFIG_XSHAPE


More information about the MPlayer-cvslog mailing list