]> Dogcows Code - chaz/openbox/blobdiff - openbox/frame.c
const
[chaz/openbox] / openbox / frame.c
index 483b1066e62240b72dd50936bbc8f09ddf9fa45c..50534823b44edf5a7d3dc979c709a899a9e087a6 100644 (file)
@@ -1,3 +1,21 @@
+/* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
+
+   frame.c for the Openbox window manager
+   Copyright (c) 2003        Ben Jansens
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   See the COPYING file for a copy of the GNU General Public License.
+*/
+
 #include "frame.h"
 #include "client.h"
 #include "openbox.h"
@@ -5,6 +23,7 @@
 #include "config.h"
 #include "framerender.h"
 #include "mainloop.h"
+#include "moveresize.h"
 #include "render/theme.h"
 
 #define PLATE_EVENTMASK (SubstructureRedirectMask | ButtonPressMask)
@@ -183,7 +202,6 @@ void frame_adjust_theme(ObFrame *self)
 {
     free_theme_statics(self);
     set_theme_statics(self);
-    frame_adjust_area(self, TRUE, TRUE, FALSE);
 }
 
 void frame_adjust_shape(ObFrame *self)
@@ -628,38 +646,40 @@ static void layout_title(ObFrame *self)
     }
 }
 
-ObFrameContext frame_context_from_string(char *name)
+ObFrameContext frame_context_from_string(const gchar *name)
 {
-    if (!g_ascii_strcasecmp("desktop", name))
+    if (!g_ascii_strcasecmp("Desktop", name))
         return OB_FRAME_CONTEXT_DESKTOP;
-    else if (!g_ascii_strcasecmp("client", name))
+    else if (!g_ascii_strcasecmp("Client", name))
         return OB_FRAME_CONTEXT_CLIENT;
-    else if (!g_ascii_strcasecmp("titlebar", name))
+    else if (!g_ascii_strcasecmp("Titlebar", name))
         return OB_FRAME_CONTEXT_TITLEBAR;
-    else if (!g_ascii_strcasecmp("handle", name))
+    else if (!g_ascii_strcasecmp("Handle", name))
         return OB_FRAME_CONTEXT_HANDLE;
-    else if (!g_ascii_strcasecmp("frame", name))
+    else if (!g_ascii_strcasecmp("Frame", name))
         return OB_FRAME_CONTEXT_FRAME;
-    else if (!g_ascii_strcasecmp("tlcorner", name))
+    else if (!g_ascii_strcasecmp("TLCorner", name))
         return OB_FRAME_CONTEXT_TLCORNER;
-    else if (!g_ascii_strcasecmp("trcorner", name))
+    else if (!g_ascii_strcasecmp("TRCorner", name))
         return OB_FRAME_CONTEXT_TRCORNER;
-    else if (!g_ascii_strcasecmp("blcorner", name))
+    else if (!g_ascii_strcasecmp("BLCorner", name))
         return OB_FRAME_CONTEXT_BLCORNER;
-    else if (!g_ascii_strcasecmp("brcorner", name))
+    else if (!g_ascii_strcasecmp("BRCorner", name))
         return OB_FRAME_CONTEXT_BRCORNER;
-    else if (!g_ascii_strcasecmp("maximize", name))
+    else if (!g_ascii_strcasecmp("Maximize", name))
         return OB_FRAME_CONTEXT_MAXIMIZE;
-    else if (!g_ascii_strcasecmp("alldesktops", name))
+    else if (!g_ascii_strcasecmp("AllDesktops", name))
         return OB_FRAME_CONTEXT_ALLDESKTOPS;
-    else if (!g_ascii_strcasecmp("shade", name))
+    else if (!g_ascii_strcasecmp("Shade", name))
         return OB_FRAME_CONTEXT_SHADE;
-    else if (!g_ascii_strcasecmp("iconify", name))
+    else if (!g_ascii_strcasecmp("Iconify", name))
         return OB_FRAME_CONTEXT_ICONIFY;
-    else if (!g_ascii_strcasecmp("icon", name))
+    else if (!g_ascii_strcasecmp("Icon", name))
         return OB_FRAME_CONTEXT_ICON;
-    else if (!g_ascii_strcasecmp("close", name))
+    else if (!g_ascii_strcasecmp("Close", name))
         return OB_FRAME_CONTEXT_CLOSE;
+    else if (!g_ascii_strcasecmp("MoveResize", name))
+        return OB_FRAME_CONTEXT_MOVE_RESIZE;
     return OB_FRAME_CONTEXT_NONE;
 }
 
@@ -667,6 +687,9 @@ ObFrameContext frame_context(ObClient *client, Window win)
 {
     ObFrame *self;
 
+    if (moveresize_in_progress)
+        return OB_FRAME_CONTEXT_MOVE_RESIZE;
+
     if (win == RootWindow(ob_display, ob_screen))
         return OB_FRAME_CONTEXT_DESKTOP;
     if (client == NULL) return OB_FRAME_CONTEXT_NONE;
This page took 0.026735 seconds and 4 git commands to generate.