diff gui/wm/ws.c @ 35662:782461b26312

Relocate some functions. This is mainly for cosmetic reasons.
author ib
date Tue, 15 Jan 2013 22:10:59 +0000
parents 60e8674e38dc
children c31b82bd6092
line wrap: on
line diff
--- a/gui/wm/ws.c	Tue Jan 15 19:12:02 2013 +0000
+++ b/gui/wm/ws.c	Tue Jan 15 22:10:59 2013 +0000
@@ -110,17 +110,6 @@
 int wsUseXShm   = True;
 int wsUseXShape = True;
 
-static int wsSearch(Window win)
-{
-    int i;
-
-    for (i = 0; i < wsWLCount; i++)
-        if (wsWindowList[i] && wsWindowList[i]->WindowID == win)
-            return i;
-
-    return -1;
-}
-
 /* --- */
 
 #define PACK_RGB16(r, g, b, pixel) pixel = (b >> 3); \
@@ -168,25 +157,6 @@
 
 #define MWM_TEAROFF_WINDOW      (1L << 0)
 
-void wsWindowDecoration(wsWindow *win, Bool decor)
-{
-    wsMotifHints = XInternAtom(wsDisplay, "_MOTIF_WM_HINTS", 0);
-
-    if (wsMotifHints == None)
-        return;
-
-    memset(&wsMotifWmHints, 0, sizeof(MotifWmHints));
-    wsMotifWmHints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS;
-
-    if (decor) {
-        wsMotifWmHints.functions   = MWM_FUNC_MOVE | MWM_FUNC_CLOSE | MWM_FUNC_MINIMIZE | MWM_FUNC_MAXIMIZE | MWM_FUNC_RESIZE;
-        wsMotifWmHints.decorations = MWM_DECOR_ALL;
-    }
-
-    XChangeProperty(wsDisplay, win->WindowID, wsMotifHints, wsMotifHints, 32,
-                    PropModeReplace, (unsigned char *)&wsMotifWmHints, 5);
-}
-
 // ----------------------------------------------------------------------------------------------
 //   Init X Window System.
 // ----------------------------------------------------------------------------------------------
@@ -688,6 +658,36 @@
     mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[ws] window is created. ( %s ).\n", label);
 }
 
+void wsWindowDecoration(wsWindow *win, Bool decor)
+{
+    wsMotifHints = XInternAtom(wsDisplay, "_MOTIF_WM_HINTS", 0);
+
+    if (wsMotifHints == None)
+        return;
+
+    memset(&wsMotifWmHints, 0, sizeof(MotifWmHints));
+    wsMotifWmHints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS;
+
+    if (decor) {
+        wsMotifWmHints.functions   = MWM_FUNC_MOVE | MWM_FUNC_CLOSE | MWM_FUNC_MINIMIZE | MWM_FUNC_MAXIMIZE | MWM_FUNC_RESIZE;
+        wsMotifWmHints.decorations = MWM_DECOR_ALL;
+    }
+
+    XChangeProperty(wsDisplay, win->WindowID, wsMotifHints, wsMotifHints, 32,
+                    PropModeReplace, (unsigned char *)&wsMotifWmHints, 5);
+}
+
+static int wsSearch(Window win)
+{
+    int i;
+
+    for (i = 0; i < wsWLCount; i++)
+        if (wsWindowList[i] && wsWindowList[i]->WindowID == win)
+            return i;
+
+    return -1;
+}
+
 void wsDestroyWindow(wsWindow *win)
 {
     int l;