1 /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
3 stacking.h for the Openbox window manager
4 Copyright (c) 2006 Mikael Magnusson
5 Copyright (c) 2003-2007 Dana Jansens
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 See the COPYING file for a copy of the GNU General Public License.
28 /*! The possible stacking layers a client window can be a part of */
30 OB_STACKING_LAYER_INVALID
,
31 OB_STACKING_LAYER_DESKTOP
, /*!< 0 - desktop windows */
32 OB_STACKING_LAYER_FULLSCREEN_BELOW
, /*!< 1 - unfocused fullscreens */
33 OB_STACKING_LAYER_BELOW
, /*!< 2 - normal windows w/ below */
34 OB_STACKING_LAYER_NORMAL
, /*!< 3 - normal windows */
35 OB_STACKING_LAYER_ABOVE
, /*!< 4 - normal windows w/ above */
36 OB_STACKING_LAYER_FULLSCREEN
, /*!< 5 - fullscreeen windows */
37 OB_STACKING_LAYER_INTERNAL
, /*!< 6 - openbox windows/menus */
38 OB_NUM_STACKING_LAYERS
41 /* list of ObWindow*s in stacking order from highest to lowest */
42 extern GList
*stacking_list
;
44 /*! Sets the window stacking list on the root window from the
46 void stacking_set_list();
48 void stacking_add(ObWindow
*win
);
49 void stacking_add_nonintrusive(ObWindow
*win
);
50 #define stacking_remove(win) stacking_list = g_list_remove(stacking_list, win);
52 /*! Raises a window above all others in its stacking layer */
53 void stacking_raise(ObWindow
*window
);
55 /*! Lowers a window below all others in its stacking layer */
56 void stacking_lower(ObWindow
*window
);
58 /*! Moves a window below another if its in the same layer.
59 This function does not enforce stacking rules IRT transients n such, and so
60 it should really ONLY be used to restore stacking orders from saved sessions
62 void stacking_below(ObWindow
*window
, ObWindow
*below
);
64 /*! Restack a window based upon a sibling (or all windows) in various ways.
65 @param client The client to be restacked
66 @param sibling Another client to compare to, or NULL to compare to all
68 @param detail One of Above, Below, TopIf, BottomIf, Opposite
69 @param activate If TRUE, and if the window is going to be raised, it will
71 See http://tronche.com/gui/x/xlib/window/configure.html for details on
72 how each detail works with and without a sibling.
74 void stacking_restack_request(struct _ObClient
*client
,
75 struct _ObClient
*sibling
,
76 gint detail
, gboolean
);