+3.4.6.1:
+ * Updated Clearlooks theme
+ * Add the force="yes/no" option for the per-app settings' <position> tag
+ * Raise and focus modal children and their direct parents together, improved
+ usability with direct modal transient windows
+ * Fix crash when using <raise> for NextWindow and there are no windows
+ to move focus to
+ * Add the <manageDesktops> option in the rc.xml <menu> section, which toggles
+ the "Manage Desktops" section appearing in the combined-client-list-menu
+ * Fix for menu headers showing the wrong text
+ * Fix for the <focusLast> behavior
+ * Treat modal direct children as one window with their parent consistently
+
+3.4.6:
+ * Added Basque translation
+ * Updated French, Vietnamese German, Simplified Chinese, Russian, Portuguese,
+ Brasilian Portuguese, Norwegian, and Finnish translations
+ * New Clearlooks theme, updated by David Barr
+ * Updated the previous Clearlooks theme, and renamed it to Clearlooks-3.4
+ * Allow dialog type windows to go fullscreen (Fixes Kpdf)
+ * Remove the extraneous top border for undecorated windows while maximized
+ * Fixes for keyboard modifiers (Alt-tab dialog getting stuck on screen for
+ some users)
+ * Automatically catch changes to the keyboard map and reconfigure the key
+ bindings on the fly
+ * Fix focus moving incorrectly sometimes with focus under mouse enabled
+ * Make default configuration focus the desktop when you right click
+ * Add the <bar> and <raise> options for all window cycling actions, allowing
+ you to have your target window temporarily raised above all others, and to
+ turn the focus target indicator bar off
+ * Improve the LastDesktop action to not remember desktops you skipped across
+ * Ignore mouse clicks that are made on override-redirect (unmanaged) windows
+ * When opening a menu with a key binding, don't use the key binding to run
+ something in the menu
+ * Add a <monitor> option for window placement, which gives you the option
+ to place new windows on the active monitor, or the monitor where the mouse
+ is, instead of on any monitor (for xinerama multihead setups)
+ * Add options for placing the window move/resize coordinate popup window in
+ a fixed position on screen, rather than relative to the window being
+ moved or resized
+ * Prevent the dock from auto-hiding completely offscreen if the theme has
+ no borders for it
+ * New icon
+ * Fix race condition when running things that want to grab the keyboard
+ (e.g. gnome-panel-control --main-menu)
+ * When dialog windows ask to not appear in the taskbar, still give them focus
+ in normal ways (fixes new GNOME session logout dialogs)
+ * Fix bug with resizing corners on certain parts of the window frame
+ * Ping applications to tell when they are running or have become frozen.
+ Show a [Not Responding] message in the title bar of windows which are
+ frozen.
+ * When closing a window which is [Not Responding], kill the window's process
+ if it is running on the same machine as Openbox. Otherwise, just
+ disconnect
+ the window from the X display. A second attempt to close a [Not
+ Responding]
+ window will kill it forcefully (kill -9).
+ * Fixes for internal timers
+ * Add a <wmclass> option for the execute action's startup-notification. This
+ lets you tell Openbox that the application will map a window with the
+ specified class - for applications that do not support startup-notification
+ natively.
+ * Fix for empty dock taking up space onscreen after a reconfigure
+ * Reduce Openbox's additional memory footprint per-window and per-menu
+ * Faster horizontal gradient rendering
+ * Don't deiconify windows that aren't allowed to be directly iconified on
+ restart (eg toolbars), as they can be iconified by other means
+ * Improve support for fullscreen windows in xinerama (TwinView) and
+ multiple-screen setups
+ * Add a --config-file command line option, to specify an alternate
+ configuration file path
+
+3.4.5:
+ * Added Hungarian translation
+ * Updated Finnish, Russian, German and French translations
+ * Fixed some very minor memory leaks
+ * Hide the desktop popup when showing the focus popup
+ * Fix a crash when trying to access the More... menu of
+ client-list-combined-menu
+ * Fix the coordinate popup only showing up on the first monitor in xinerama
+ * Add --exit to exit the currently running openbox instance
+
3.4.4:
* Updated Traditional Chinese translation
* Updated Norwegian translation
openbox/actions/fullscreen.c \
openbox/actions/growtoedge.c \
openbox/actions/iconify.c \
- openbox/actions/if.c \
openbox/actions/kill.c \
openbox/actions/layer.c \
openbox/actions/lower.c \
openbox/actions/resizerelative.c \
openbox/actions/restart.c \
openbox/actions/shade.c \
+ openbox/actions/shadelowerraise.c \
openbox/actions/showdesktop.c \
openbox/actions/showmenu.c \
openbox/actions/unfocus.c \
AC_PREREQ([2.54])
-AC_INIT([openbox], [3.999.0], [http://bugzilla.icculus.org])
+AC_INIT([openbox], [3.4.6.1], [http://bugzilla.icculus.org])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([openbox/openbox.c])
dnl
OB_MAJOR_VERSION=3
OB_MINOR_VERSION=4
-OB_MICRO_VERSION=16
-OB_INTERFACE_AGE=0
-OB_BINARY_AGE=0
+OB_MICRO_VERSION=20
+OB_INTERFACE_AGE=4
+OB_BINARY_AGE=4
OB_VERSION=$OB_MAJOR_VERSION.$OB_MINOR_VERSION
AC_SUBST(OB_MAJOR_VERSION)
<!-- Keybindings for desktop switching -->
<keybind key="C-A-Left">
- <action name="GoToDesktop"><to>left</to><wrap>no</wrap></action>
+ <action name="DesktopLeft"><dialog>no</dialog><wrap>no</wrap></action>
</keybind>
<keybind key="C-A-Right">
- <action name="GoToDesktop"><to>right</to><wrap>no</wrap></action>
+ <action name="DesktopRight"><dialog>no</dialog><wrap>no</wrap></action>
</keybind>
<keybind key="C-A-Up">
- <action name="GoToDesktop"><to>up</to><wrap>no</wrap></action>
+ <action name="DesktopUp"><dialog>no</dialog><wrap>no</wrap></action>
</keybind>
<keybind key="C-A-Down">
- <action name="GoToDesktop"><to>down</to><wrap>no</wrap></action>
+ <action name="DesktopDown"><dialog>no</dialog><wrap>no</wrap></action>
</keybind>
<keybind key="S-A-Left">
- <action name="SendToDesktop"><to>left</to><wrap>no</wrap></action>
+ <action name="SendToDesktopLeft"><dialog>no</dialog><wrap>no</wrap></action>
</keybind>
<keybind key="S-A-Right">
- <action name="SendToDesktop"><to>right</to><wrap>no</wrap></action>
+ <action name="SendToDesktopRight"><dialog>no</dialog><wrap>no</wrap></action>
</keybind>
<keybind key="S-A-Up">
- <action name="SendToDesktop"><to>up</to><wrap>no</wrap></action>
+ <action name="SendToDesktopUp"><dialog>no</dialog><wrap>no</wrap></action>
</keybind>
<keybind key="S-A-Down">
- <action name="SendToDesktop"><to>down</to><wrap>no</wrap></action>
+ <action name="SendToDesktopDown"><dialog>no</dialog><wrap>no</wrap></action>
</keybind>
<keybind key="W-F1">
- <action name="GoToDesktop"><to>1</to></action>
+ <action name="Desktop"><desktop>1</desktop></action>
</keybind>
<keybind key="W-F2">
- <action name="GoToDesktop"><to>2</to></action>
+ <action name="Desktop"><desktop>2</desktop></action>
</keybind>
<keybind key="W-F3">
- <action name="GoToDesktop"><to>3</to></action>
+ <action name="Desktop"><desktop>3</desktop></action>
</keybind>
<keybind key="W-F4">
- <action name="GoToDesktop"><to>4</to></action>
+ <action name="Desktop"><desktop>4</desktop></action>
</keybind>
<keybind key="W-d">
<action name="ToggleShowDesktop"/>
<!-- Keybindings for window switching -->
<keybind key="A-Tab">
- <action name="NextWindow">
- <finalactions>
- <action name="Focus"/>
- <action name="Raise"/>
- <action name="Unshade"/>
- </finalactions>
- </action>
+ <action name="NextWindow"/>
</keybind>
<keybind key="A-S-Tab">
- <action name="PreviousWindow">
- <finalactions>
- <action name="Focus"/>
- <action name="Raise"/>
- <action name="Unshade"/>
- </finalactions>
- </action>
+ <action name="PreviousWindow"/>
</keybind>
<keybind key="C-A-Tab">
<action name="NextWindow">
<panels>yes</panels><desktop>yes</desktop>
- <finalactions>
- <action name="Focus"/>
- <action name="Raise"/>
- <action name="Unshade"/>
- </finalactions>
</action>
</keybind>
</mousebind>
<mousebind button="A-Up" action="Click">
- <action name="GoToDesktop"><to>previous</to></action>
+ <action name="DesktopPrevious"/>
</mousebind>
<mousebind button="A-Down" action="Click">
- <action name="GoToDesktop"><to>next</to></action>
+ <action name="DesktopNext"/>
</mousebind>
<mousebind button="C-A-Up" action="Click">
- <action name="GoToDesktop"><to>previous</to></action>
+ <action name="DesktopPrevious"/>
</mousebind>
<mousebind button="C-A-Down" action="Click">
- <action name="GoToDesktop"><to>next</to></action>
+ <action name="DesktopNext"/>
</mousebind>
<mousebind button="A-S-Up" action="Click">
- <action name="SendToDesktop"><to>previous</to></action>
+ <action name="SendToDesktopPrevious"/>
</mousebind>
<mousebind button="A-S-Down" action="Click">
- <action name="SendToDesktop"><to>next</to></action>
+ <action name="SendToDesktopNext"/>
</mousebind>
</context>
<action name="Move"/>
</mousebind>
<mousebind button="Left" action="DoubleClick">
- <action name="ToggleMaximize"/>
+ <action name="ToggleMaximizeFull"/>
</mousebind>
<mousebind button="Middle" action="Press">
<action name="Raise"/>
</mousebind>
<mousebind button="Left" action="Drag">
- <action name="Resize"><edge>bottomleft</edge></action>
+ <action name="Resize"/>
</mousebind>
</context>
<action name="Raise"/>
</mousebind>
<mousebind button="Left" action="Drag">
- <action name="Resize"><edge>bottomright</edge></action>
+ <action name="Resize"/>
</mousebind>
</context>
<action name="Unshade"/>
</mousebind>
<mousebind button="Left" action="Drag">
- <action name="Resize"><edge>topleft</edge></action>
+ <action name="Resize"/>
</mousebind>
</context>
<action name="Unshade"/>
</mousebind>
<mousebind button="Left" action="Drag">
- <action name="Resize"><edge>topright</edge></action>
+ <action name="Resize"/>
</mousebind>
</context>
<action name="Unshade"/>
</mousebind>
<mousebind button="Left" action="Click">
- <action name="ToggleMaximize"/>
+ <action name="ToggleMaximizeFull"/>
</mousebind>
<mousebind button="Middle" action="Click">
- <action name="ToggleMaximize"><direction>vertical</direction></action>
+ <action name="ToggleMaximizeVert"/>
</mousebind>
<mousebind button="Right" action="Click">
- <action name="ToggleMaximize"><direction>horizontal</direction></action>
+ <action name="ToggleMaximizeHorz"/>
</mousebind>
</context>
</context>
<context name="Desktop">
- <mousebind button="Up" action="Press">
- <action name="GoToDesktop"><to>previous</to></action>
+ <mousebind button="Up" action="Click">
+ <action name="DesktopPrevious"/>
</mousebind>
- <mousebind button="Down" action="Press">
- <action name="GoToDesktop"><to>next</to></action>
+ <mousebind button="Down" action="Click">
+ <action name="DesktopNext"/>
</mousebind>
- <mousebind button="A-Up" action="Press">
- <action name="GoToDesktop"><to>previous</to></action>
+ <mousebind button="A-Up" action="Click">
+ <action name="DesktopPrevious"/>
</mousebind>
- <mousebind button="A-Down" action="Press">
- <action name="GoToDesktop"><to>next</to></action>
+ <mousebind button="A-Down" action="Click">
+ <action name="DesktopNext"/>
</mousebind>
- <mousebind button="C-A-Up" action="Press">
- <action name="GoToDesktop"><to>previous</to></action>
+ <mousebind button="C-A-Up" action="Click">
+ <action name="DesktopPrevious"/>
</mousebind>
- <mousebind button="C-A-Down" action="Press">
- <action name="GoToDesktop"><to>next</to></action>
+ <mousebind button="C-A-Down" action="Click">
+ <action name="DesktopNext"/>
</mousebind>
<mousebind button="Left" action="Press">
</context>
<context name="MoveResize">
- <mousebind button="Up" action="Press">
- <action name="GoToDesktop"><to>previous</to></action>
+ <mousebind button="Up" action="Click">
+ <action name="DesktopPrevious"/>
</mousebind>
- <mousebind button="Down" action="Press">
- <action name="GoToDesktop"><to>next</to></action>
+ <mousebind button="Down" action="Click">
+ <action name="DesktopNext"/>
</mousebind>
- <mousebind button="A-Up" action="Press">
- <action name="GoToDesktop"><to>previous</to></action>
+ <mousebind button="A-Up" action="Click">
+ <action name="DesktopPrevious"/>
</mousebind>
- <mousebind button="A-Down" action="Press">
- <action name="GoToDesktop"><to>next</to></action>
+ <mousebind button="A-Down" action="Click">
+ <action name="DesktopNext"/>
</mousebind>
</context>
</mouse>
<!-- XML Schema for the Openbox window manager configuration file -->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://openbox.org/4.0/rc"
- xmlns:ob="http://openbox.org/4.0/rc"
+ targetNamespace="http://openbox.org/3.4/rc"
+ xmlns:ob="http://openbox.org/3.4/rc"
elementFormDefault="qualified">
<!--
root node
-->
<xsd:simpleType name="actionname">
<xsd:restriction base="xsd:string">
- <xsd:enumeration value="AddDesktop"/>
+ <xsd:enumeration value="Activate"/>
<xsd:enumeration value="BreakChroot"/>
<xsd:enumeration value="Close"/>
- <xsd:enumeration value="Debug"/>
- <xsd:enumeration value="Decorate"/>
- <xsd:enumeration value="DirectionalCycleWindows"/>
- <xsd:enumeration value="DirectionalTargetWindow"/>
+ <xsd:enumeration value="Desktop"/>
+ <xsd:enumeration value="DesktopDown"/>
+ <xsd:enumeration value="DesktopLast"/>
+ <xsd:enumeration value="DesktopLeft"/>
+ <xsd:enumeration value="DesktopNext"/>
+ <xsd:enumeration value="DesktopPrevious"/>
+ <xsd:enumeration value="DesktopRight"/>
+ <xsd:enumeration value="DesktopUp"/>
+ <xsd:enumeration value="DirectionalFocusEast"/>
+ <xsd:enumeration value="DirectionalFocusNorth"/>
+ <xsd:enumeration value="DirectionalFocusNortheast"/>
+ <xsd:enumeration value="DirectionalFocusNorthwest"/>
+ <xsd:enumeration value="DirectionalFocusSouth"/>
+ <xsd:enumeration value="DirectionalFocusSoutheast"/>
+ <xsd:enumeration value="DirectionalFocusSouthwest"/>
+ <xsd:enumeration value="DirectionalFocusWest"/>
<xsd:enumeration value="Execute"/>
<xsd:enumeration value="Exit"/>
<xsd:enumeration value="Focus"/>
<xsd:enumeration value="FocusToBottom"/>
- <xsd:enumeration value="GoToDesktop"/>
- <xsd:enumeration value="GrowToEdge"/>
+ <xsd:enumeration value="GrowToEdgeEast"/>
+ <xsd:enumeration value="GrowToEdgeNorth"/>
+ <xsd:enumeration value="GrowToEdgeSouth"/>
+ <xsd:enumeration value="GrowToEdgeWest"/>
<xsd:enumeration value="Iconify"/>
- <xsd:enumeration value="If"/>
<xsd:enumeration value="Kill"/>
<xsd:enumeration value="Lower"/>
- <xsd:enumeration value="Maximize"/>
+ <xsd:enumeration value="MaximizeFull"/>
+ <xsd:enumeration value="MaximizeHorz"/>
+ <xsd:enumeration value="MaximizeVert"/>
<xsd:enumeration value="Move"/>
<xsd:enumeration value="MoveRelative"/>
- <xsd:enumeration value="MoveResizeTo"/>
- <xsd:enumeration value="MoveToEdge"/>
+ <xsd:enumeration value="MoveRelativeHorz"/>
+ <xsd:enumeration value="MoveRelativeVert"/>
+ <xsd:enumeration value="MoveToCenter"/>
+ <xsd:enumeration value="MoveFromEdgeEast"/>
+ <xsd:enumeration value="MoveFromEdgeNorth"/>
+ <xsd:enumeration value="MoveFromEdgeSouth"/>
+ <xsd:enumeration value="MoveFromEdgeWest"/>
+ <xsd:enumeration value="MoveToEdgeEast"/>
+ <xsd:enumeration value="MoveToEdgeNorth"/>
+ <xsd:enumeration value="MoveToEdgeSouth"/>
+ <xsd:enumeration value="MoveToEdgeWest"/>
<xsd:enumeration value="NextWindow"/>
<xsd:enumeration value="PreviousWindow"/>
<xsd:enumeration value="Raise"/>
<xsd:enumeration value="RaiseLower"/>
<xsd:enumeration value="Reconfigure"/>
- <xsd:enumeration value="RemoveDesktop"/>
<xsd:enumeration value="Resize"/>
<xsd:enumeration value="ResizeRelative"/>
+ <xsd:enumeration value="ResizeRelativeHorz"/>
+ <xsd:enumeration value="ResizeRelativeVert"/>
<xsd:enumeration value="Restart"/>
+ <xsd:enumeration value="SendToBottomLayer"/>
<xsd:enumeration value="SendToDesktop"/>
- <xsd:enumeration value="SendToLayer"/>
+ <xsd:enumeration value="SendToDesktopDown"/>
+ <xsd:enumeration value="SendToDesktopLeft"/>
+ <xsd:enumeration value="SendToDesktopNext"/>
+ <xsd:enumeration value="SendToDesktopPrevious"/>
+ <xsd:enumeration value="SendToDesktopRight"/>
+ <xsd:enumeration value="SendToDesktopUp"/>
+ <xsd:enumeration value="SendToNormalLayer"/>
+ <xsd:enumeration value="SendToTopLayer"/>
<xsd:enumeration value="Shade"/>
+ <xsd:enumeration value="ShadeLower"/>
+ <xsd:enumeration value="ShowDesktop"/>
<xsd:enumeration value="ShowMenu"/>
<xsd:enumeration value="ToggleAlwaysOnBottom"/>
<xsd:enumeration value="ToggleAlwaysOnTop"/>
<xsd:enumeration value="ToggleDecorations"/>
<xsd:enumeration value="ToggleDockAutoHide"/>
<xsd:enumeration value="ToggleFullscreen"/>
- <xsd:enumeration value="ToggleMaximize"/>
+ <xsd:enumeration value="ToggleMaximizeFull"/>
+ <xsd:enumeration value="ToggleMaximizeHorz"/>
+ <xsd:enumeration value="ToggleMaximizeVert"/>
<xsd:enumeration value="ToggleOmnipresent"/>
<xsd:enumeration value="ToggleShade"/>
<xsd:enumeration value="ToggleShowDesktop"/>
- <xsd:enumeration value="Undecorate"/>
<xsd:enumeration value="Unfocus"/>
- <xsd:enumeration value="Unmaximize"/>
+ <xsd:enumeration value="UnmaximizeFull"/>
+ <xsd:enumeration value="UnmaximizeHorz"/>
+ <xsd:enumeration value="UnmaximizeVert"/>
<xsd:enumeration value="Unshade"/>
+ <xsd:enumeration value="UnshadeRaise"/>
+ <xsd:enumeration value="UnShowDesktop"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="clienttype">
<xsd:enumeration value="Left"/>
<xsd:enumeration value="Right"/>
<xsd:enumeration value="Bottom"/>
+ <xsd:enumeration value="Handle"/>
<xsd:enumeration value="Maximize"/>
<xsd:enumeration value="AllDesktops"/>
<xsd:enumeration value="Shade"/>
static gpointer setup_add_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
static gpointer setup_remove_func(ObParseInst *i,
xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_addcurrent_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_addlast_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_removecurrent_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_removelast_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
static void free_func(gpointer options);
static gboolean run_func(ObActionsData *data, gpointer options);
free_func,
run_func,
NULL, NULL);
+ actions_register("AddDesktopLast",
+ setup_addlast_func,
+ free_func,
+ run_func,
+ NULL, NULL);
+ actions_register("RemoveDesktopLast",
+ setup_removelast_func,
+ free_func,
+ run_func,
+ NULL, NULL);
+ actions_register("AddDesktopCurrent",
+ setup_addcurrent_func,
+ free_func,
+ run_func,
+ NULL, NULL);
+ actions_register("RemoveDesktopCurrent",
+ setup_removecurrent_func,
+ free_func,
+ run_func,
+ NULL, NULL);
}
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
return o;
}
+static gpointer setup_addcurrent_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_add_func(i, doc, node);
+ o->current = TRUE;
+ return o;
+}
+
+static gpointer setup_addlast_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_add_func(i, doc, node);
+ o->current = FALSE;
+ return o;
+}
+
+static gpointer setup_removecurrent_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_remove_func(i, doc, node);
+ o->current = TRUE;
+ return o;
+}
+
+static gpointer setup_removelast_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_remove_func(i, doc, node);
+ o->current = FALSE;
+ return o;
+}
+
static void free_func(gpointer options)
{
Options *o = options;
action_layer_startup();
action_movetoedge_startup();
action_growtoedge_startup();
- action_if_startup();
action_focustobottom_startup();
+ action_shadelowerraise_startup();
}
void action_layer_startup();
void action_movetoedge_startup();
void action_growtoedge_startup();
-void action_if_startup();
void action_focustobottom_startup();
+void action_shadelowerraise_startup();
#endif
#include "openbox/event.h"
#include "openbox/focus_cycle.h"
#include "openbox/openbox.h"
+#include "openbox/client.h"
#include "gettext.h"
typedef struct {
gboolean follow;
} Options;
-static gpointer setup_go_func(ObParseInst *i, xmlDocPtr doc,
- xmlNodePtr node);
-static gpointer setup_send_func(ObParseInst *i, xmlDocPtr doc,
- xmlNodePtr node);
+static gpointer setup_go_last_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node);
+static gpointer setup_send_last_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node);
+static gpointer setup_go_abs_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node);
+static gpointer setup_send_abs_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node);
+static gpointer setup_go_next_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node);
+static gpointer setup_send_next_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node);
+static gpointer setup_go_prev_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node);
+static gpointer setup_send_prev_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node);
+static gpointer setup_go_left_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node);
+static gpointer setup_send_left_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node);
+static gpointer setup_go_right_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node);
+static gpointer setup_send_right_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node);
+static gpointer setup_go_up_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node);
+static gpointer setup_send_up_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node);
+static gpointer setup_go_down_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node);
+static gpointer setup_send_down_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node);
static gboolean run_func(ObActionsData *data, gpointer options);
void action_desktop_startup(void)
{
- actions_register("GoToDesktop", setup_go_func, g_free, run_func,
- NULL, NULL);
- actions_register("SendToDesktop", setup_send_func, g_free, run_func,
- NULL, NULL);
+ actions_register("DesktopLast", setup_go_last_func, g_free,
+ run_func, NULL, NULL);
+ actions_register("SendToDesktopLast", setup_send_last_func, g_free,
+ run_func, NULL, NULL);
+ actions_register("Desktop", setup_go_abs_func, g_free,
+ run_func, NULL, NULL);
+ actions_register("SendToDesktop", setup_send_abs_func, g_free,
+ run_func, NULL, NULL);
+ actions_register("DesktopNext", setup_go_next_func, g_free,
+ run_func, NULL, NULL);
+ actions_register("SendToDesktopNext", setup_send_next_func, g_free,
+ run_func, NULL, NULL);
+ actions_register("DesktopPrevious", setup_go_prev_func, g_free,
+ run_func, NULL, NULL);
+ actions_register("SendToDesktopPrevious", setup_send_prev_func, g_free,
+ run_func, NULL, NULL);
+ actions_register("DesktopLeft", setup_go_left_func, g_free,
+ run_func, NULL, NULL);
+ actions_register("SendToDesktopLeft", setup_send_left_func, g_free,
+ run_func, NULL, NULL);
+ actions_register("DesktopRight", setup_go_right_func, g_free,
+ run_func, NULL, NULL);
+ actions_register("SendToDesktopRight", setup_send_right_func, g_free,
+ run_func, NULL, NULL);
+ actions_register("DesktopUp", setup_go_up_func, g_free,
+ run_func, NULL, NULL);
+ actions_register("SendToDesktopUp", setup_send_up_func, g_free,
+ run_func, NULL, NULL);
+ actions_register("DesktopDown", setup_go_down_func, g_free,
+ run_func, NULL, NULL);
+ actions_register("SendToDesktopDown", setup_send_down_func, g_free,
+ run_func, NULL, NULL);
}
-static gpointer setup_go_func(ObParseInst *i, xmlDocPtr doc,
- xmlNodePtr node)
+static gpointer setup_follow(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
{
xmlNodePtr n;
- Options *o;
+ Options *o = g_new0(Options, 1);
+ o->send = TRUE;
+ o->follow = TRUE;
+ if ((n = parse_find_node("follow", node)))
+ o->follow = parse_bool(doc, n);
+ return o;
+}
- o = g_new0(Options, 1);
- /* don't go anywhere if theres no options given */
+static gpointer setup_go_last_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ o->type = LAST;
+ return o;
+}
+
+static gpointer setup_send_last_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node)
+{
+ Options *o = setup_follow(i, doc, node);
+ o->type = LAST;
+ return o;
+}
+
+static gpointer setup_go_abs_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node)
+{
+ xmlNodePtr n;
+ Options *o = g_new0(Options, 1);
o->type = ABSOLUTE;
- o->abs.desktop = screen_desktop;
- /* wrap by default - it's handy! */
- o->rel.wrap = TRUE;
+ if ((n = parse_find_node("desktop", node)))
+ o->abs.desktop = parse_int(doc, n) - 1;
+ else
+ o->abs.desktop = screen_desktop;
+ return o;
+}
- if ((n = parse_find_node("to", node))) {
- gchar *s = parse_string(doc, n);
- if (!g_ascii_strcasecmp(s, "last"))
- o->type = LAST;
- else if (!g_ascii_strcasecmp(s, "next")) {
- o->type = RELATIVE;
- o->rel.linear = TRUE;
- o->rel.dir = OB_DIRECTION_EAST;
- }
- else if (!g_ascii_strcasecmp(s, "previous")) {
- o->type = RELATIVE;
- o->rel.linear = TRUE;
- o->rel.dir = OB_DIRECTION_WEST;
- }
- else if (!g_ascii_strcasecmp(s, "north") ||
- !g_ascii_strcasecmp(s, "up")) {
- o->type = RELATIVE;
- o->rel.dir = OB_DIRECTION_NORTH;
- }
- else if (!g_ascii_strcasecmp(s, "south") ||
- !g_ascii_strcasecmp(s, "down")) {
- o->type = RELATIVE;
- o->rel.dir = OB_DIRECTION_SOUTH;
- }
- else if (!g_ascii_strcasecmp(s, "west") ||
- !g_ascii_strcasecmp(s, "left")) {
- o->type = RELATIVE;
- o->rel.dir = OB_DIRECTION_WEST;
- }
- else if (!g_ascii_strcasecmp(s, "east") ||
- !g_ascii_strcasecmp(s, "right")) {
- o->type = RELATIVE;
- o->rel.dir = OB_DIRECTION_EAST;
- }
- else {
- o->type = ABSOLUTE;
- o->abs.desktop = parse_int(doc, n) - 1;
- }
- g_free(s);
- }
+static gpointer setup_send_abs_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node)
+{
+ xmlNodePtr n;
+ Options *o = setup_follow(i, doc, node);
+ o->type = ABSOLUTE;
+ if ((n = parse_find_node("desktop", node)))
+ o->abs.desktop = parse_int(doc, n) - 1;
+ else
+ o->abs.desktop = screen_desktop;
+ return o;
+}
+
+static void setup_rel(Options *o, ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node, gboolean lin, ObDirection dir)
+{
+ xmlNodePtr n;
+
+ o->type = RELATIVE;
+ o->rel.linear = lin;
+ o->rel.dir = dir;
+ o->rel.wrap = TRUE;
if ((n = parse_find_node("wrap", node)))
o->rel.wrap = parse_bool(doc, n);
+}
+static gpointer setup_go_next_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ setup_rel(o, i, doc, node, TRUE, OB_DIRECTION_EAST);
return o;
}
-static gpointer setup_send_func(ObParseInst *i, xmlDocPtr doc,
- xmlNodePtr node)
+static gpointer setup_send_next_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node)
{
- xmlNodePtr n;
- Options *o;
+ Options *o = setup_follow(i, doc, node);
+ setup_rel(o, i, doc, node, TRUE, OB_DIRECTION_EAST);
+ return o;
+}
- o = setup_go_func(i, doc, node);
- o->send = TRUE;
- o->follow = TRUE;
+static gpointer setup_go_prev_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ setup_rel(o, i, doc, node, TRUE, OB_DIRECTION_WEST);
+ return o;
+}
- if ((n = parse_find_node("follow", node)))
- o->follow = parse_bool(doc, n);
+static gpointer setup_send_prev_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node)
+{
+ Options *o = setup_follow(i, doc, node);
+ setup_rel(o, i, doc, node, TRUE, OB_DIRECTION_WEST);
+ return o;
+}
+
+static gpointer setup_go_left_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ setup_rel(o, i, doc, node, FALSE, OB_DIRECTION_WEST);
+ return o;
+}
+
+static gpointer setup_send_left_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node)
+{
+ Options *o = setup_follow(i, doc, node);
+ setup_rel(o, i, doc, node, FALSE, OB_DIRECTION_WEST);
+ return o;
+}
+
+static gpointer setup_go_right_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ setup_rel(o, i, doc, node, FALSE, OB_DIRECTION_EAST);
+ return o;
+}
+
+static gpointer setup_send_right_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node)
+{
+ Options *o = setup_follow(i, doc, node);
+ setup_rel(o, i, doc, node, FALSE, OB_DIRECTION_EAST);
+ return o;
+}
+
+static gpointer setup_go_up_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ setup_rel(o, i, doc, node, FALSE, OB_DIRECTION_NORTH);
+ return o;
+}
+
+static gpointer setup_send_up_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node)
+{
+ Options *o = setup_follow(i, doc, node);
+ setup_rel(o, i, doc, node, FALSE, OB_DIRECTION_NORTH);
+ return o;
+}
+static gpointer setup_go_down_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ setup_rel(o, i, doc, node, FALSE, OB_DIRECTION_SOUTH);
+ return o;
+}
+
+static gpointer setup_send_down_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node)
+{
+ Options *o = setup_follow(i, doc, node);
+ setup_rel(o, i, doc, node, FALSE, OB_DIRECTION_SOUTH);
return o;
}
#include "openbox/window.h"
#include "openbox/focus_cycle.h"
#include "openbox/openbox.h"
+#include "openbox/client.h"
#include "openbox/misc.h"
#include "gettext.h"
static gboolean cycling = FALSE;
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
-static gpointer setup_cycle_func(ObParseInst *i, xmlDocPtr doc,
- xmlNodePtr node);
-static gpointer setup_target_func(ObParseInst *i, xmlDocPtr doc,
- xmlNodePtr node);
+static gpointer setup_north_cycle_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_south_cycle_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_east_cycle_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_west_cycle_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_northwest_cycle_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_northeast_cycle_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_southwest_cycle_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_southeast_cycle_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_north_target_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_south_target_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_east_target_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_west_target_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_northwest_target_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_northeast_target_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_southwest_target_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_southeast_target_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
static void free_func(gpointer options);
static gboolean run_func(ObActionsData *data, gpointer options);
static gboolean i_input_func(guint initial_state,
void action_directionalwindows_startup(void)
{
- actions_register("DirectionalCycleWindows", setup_cycle_func, free_func,
- run_func, i_input_func, i_cancel_func);
- actions_register("DirectionalTargetWindow", setup_target_func, free_func,
- run_func, NULL, NULL);
+ actions_register("DirectionalFocusNorth", setup_north_cycle_func,
+ free_func, run_func, i_input_func, i_cancel_func);
+ actions_register("DirectionalFocusSouth", setup_south_cycle_func,
+ free_func, run_func, i_input_func, i_cancel_func);
+ actions_register("DirectionalFocusWest", setup_west_cycle_func,
+ free_func, run_func, i_input_func, i_cancel_func);
+ actions_register("DirectionalFocusEast", setup_east_cycle_func,
+ free_func, run_func, i_input_func, i_cancel_func);
+ actions_register("DirectionalFocusNorthWest", setup_northwest_cycle_func,
+ free_func, run_func, i_input_func, i_cancel_func);
+ actions_register("DirectionalFocusNorthEast", setup_northeast_cycle_func,
+ free_func, run_func, i_input_func, i_cancel_func);
+ actions_register("DirectionalFocusSouthWest", setup_southwest_cycle_func,
+ free_func, run_func, i_input_func, i_cancel_func);
+ actions_register("DirectionalFocusSouthEast", setup_southeast_cycle_func,
+ free_func, run_func, i_input_func, i_cancel_func);
+ actions_register("DirectionalTargetNorth", setup_north_target_func,
+ free_func, run_func, i_input_func, i_cancel_func);
+ actions_register("DirectionalTargetSouth", setup_south_target_func,
+ free_func, run_func, i_input_func, i_cancel_func);
+ actions_register("DirectionalTargetWest", setup_west_target_func,
+ free_func, run_func, i_input_func, i_cancel_func);
+ actions_register("DirectionalTargetEast", setup_east_target_func,
+ free_func, run_func, i_input_func, i_cancel_func);
+ actions_register("DirectionalTargetNorthWest", setup_northwest_target_func,
+ free_func, run_func, i_input_func, i_cancel_func);
+ actions_register("DirectionalTargetNorthEast", setup_northeast_target_func,
+ free_func, run_func, i_input_func, i_cancel_func);
+ actions_register("DirectionalTargetSouthWest", setup_southwest_target_func,
+ free_func, run_func, i_input_func, i_cancel_func);
+ actions_register("DirectionalTargetSouthEast", setup_southeast_target_func,
+ free_func, run_func, i_input_func, i_cancel_func);
}
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
o->dock_windows = parse_bool(doc, n);
if ((n = parse_find_node("desktop", node)))
o->desktop_windows = parse_bool(doc, n);
- if ((n = parse_find_node("direction", node))) {
- gchar *s = parse_string(doc, n);
- if (!g_ascii_strcasecmp(s, "north") ||
- !g_ascii_strcasecmp(s, "up"))
- o->direction = OB_DIRECTION_NORTH;
- else if (!g_ascii_strcasecmp(s, "northwest"))
- o->direction = OB_DIRECTION_NORTHWEST;
- else if (!g_ascii_strcasecmp(s, "northeast"))
- o->direction = OB_DIRECTION_NORTHEAST;
- else if (!g_ascii_strcasecmp(s, "west") ||
- !g_ascii_strcasecmp(s, "left"))
- o->direction = OB_DIRECTION_WEST;
- else if (!g_ascii_strcasecmp(s, "east") ||
- !g_ascii_strcasecmp(s, "right"))
- o->direction = OB_DIRECTION_EAST;
- else if (!g_ascii_strcasecmp(s, "south") ||
- !g_ascii_strcasecmp(s, "down"))
- o->direction = OB_DIRECTION_SOUTH;
- else if (!g_ascii_strcasecmp(s, "southwest"))
- o->direction = OB_DIRECTION_SOUTHWEST;
- else if (!g_ascii_strcasecmp(s, "southeast"))
- o->direction = OB_DIRECTION_SOUTHEAST;
- g_free(s);
- }
if ((n = parse_find_node("finalactions", node))) {
xmlNodePtr m;
return o;
}
-static gpointer setup_cycle_func(ObParseInst *i, xmlDocPtr doc,
- xmlNodePtr node)
+static gpointer setup_north_cycle_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_func(i, doc, node);
+ o->interactive = TRUE;
+ o->direction = OB_DIRECTION_NORTH;
+ return o;
+}
+
+static gpointer setup_south_cycle_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_func(i, doc, node);
+ o->interactive = TRUE;
+ o->direction = OB_DIRECTION_SOUTH;
+ return o;
+}
+
+static gpointer setup_east_cycle_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_func(i, doc, node);
+ o->interactive = TRUE;
+ o->direction = OB_DIRECTION_EAST;
+ return o;
+}
+
+static gpointer setup_west_cycle_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_func(i, doc, node);
+ o->interactive = TRUE;
+ o->direction = OB_DIRECTION_WEST;
+ return o;
+}
+
+static gpointer setup_northwest_cycle_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_func(i, doc, node);
+ o->interactive = TRUE;
+ o->direction = OB_DIRECTION_NORTHWEST;
+ return o;
+}
+
+static gpointer setup_northeast_cycle_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_func(i, doc, node);
+ o->interactive = TRUE;
+ o->direction = OB_DIRECTION_EAST;
+ return o;
+}
+
+static gpointer setup_southwest_cycle_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_func(i, doc, node);
+ o->interactive = TRUE;
+ o->direction = OB_DIRECTION_SOUTHWEST;
+ return o;
+}
+
+static gpointer setup_southeast_cycle_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
{
Options *o = setup_func(i, doc, node);
o->interactive = TRUE;
+ o->direction = OB_DIRECTION_SOUTHEAST;
+ return o;
+}
+
+static gpointer setup_north_target_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_func(i, doc, node);
+ o->interactive = FALSE;
+ o->direction = OB_DIRECTION_NORTH;
+ return o;
+}
+
+static gpointer setup_south_target_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_func(i, doc, node);
+ o->interactive = FALSE;
+ o->direction = OB_DIRECTION_SOUTH;
+ return o;
+}
+
+static gpointer setup_east_target_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_func(i, doc, node);
+ o->interactive = FALSE;
+ o->direction = OB_DIRECTION_EAST;
+ return o;
+}
+
+static gpointer setup_west_target_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_func(i, doc, node);
+ o->interactive = FALSE;
+ o->direction = OB_DIRECTION_WEST;
+ return o;
+}
+
+static gpointer setup_northwest_target_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_func(i, doc, node);
+ o->interactive = FALSE;
+ o->direction = OB_DIRECTION_NORTHWEST;
+ return o;
+}
+
+static gpointer setup_northeast_target_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_func(i, doc, node);
+ o->interactive = FALSE;
+ o->direction = OB_DIRECTION_NORTHEAST;
+ return o;
+}
+
+static gpointer setup_southwest_target_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_func(i, doc, node);
+ o->interactive = FALSE;
+ o->direction = OB_DIRECTION_SOUTHWEST;
return o;
}
-static gpointer setup_target_func(ObParseInst *i, xmlDocPtr doc,
- xmlNodePtr node)
+static gpointer setup_southeast_target_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
{
Options *o = setup_func(i, doc, node);
o->interactive = FALSE;
+ o->direction = OB_DIRECTION_SOUTHEAST;
return o;
}
typedef struct {
gboolean here;
+ gboolean activate;
} Options;
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_activate_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
static void free_func(gpointer options);
static gboolean run_func(ObActionsData *data, gpointer options);
free_func,
run_func,
NULL, NULL);
+ actions_register("Activate",
+ setup_activate_func,
+ free_func,
+ run_func,
+ NULL, NULL);
}
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
return o;
}
+static gpointer setup_activate_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = setup_func(i, doc, node);
+ o->activate = TRUE;
+ return o;
+}
+
static void free_func(gpointer options)
{
Options *o = options;
data->context != OB_FRAME_CONTEXT_FRAME))
{
actions_client_move(data, TRUE);
- client_activate(data->client, o->here, FALSE, FALSE, TRUE);
+ client_activate(data->client, o->here,
+ o->activate, o->activate, TRUE);
actions_client_move(data, FALSE);
}
} else if (data->context == OB_FRAME_CONTEXT_DESKTOP) {
ObDirection dir;
} Options;
-static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
-static void free_func(gpointer options);
+static gpointer setup_north_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_south_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_east_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_west_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
static gboolean run_func(ObActionsData *data, gpointer options);
void action_growtoedge_startup(void)
{
- actions_register("GrowToEdge",
- setup_func,
- free_func,
- run_func,
+ actions_register("GrowToEdgeNorth", setup_north_func, g_free, run_func,
+ NULL, NULL);
+ actions_register("GrowToEdgeSouth", setup_south_func, g_free, run_func,
+ NULL, NULL);
+ actions_register("GrowToEdgeEast", setup_east_func, g_free, run_func,
+ NULL, NULL);
+ actions_register("GrowToEdgeWest", setup_west_func, g_free, run_func,
NULL, NULL);
}
-static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
+static gpointer setup_north_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
{
- xmlNodePtr n;
- Options *o;
-
- o = g_new0(Options, 1);
+ Options *o = g_new0(Options, 1);
o->dir = OB_DIRECTION_NORTH;
+ return o;
+}
- if ((n = parse_find_node("direction", node))) {
- gchar *s = parse_string(doc, n);
- if (!g_ascii_strcasecmp(s, "north") ||
- !g_ascii_strcasecmp(s, "up"))
- o->dir = OB_DIRECTION_NORTH;
- else if (!g_ascii_strcasecmp(s, "south") ||
- !g_ascii_strcasecmp(s, "down"))
- o->dir = OB_DIRECTION_SOUTH;
- else if (!g_ascii_strcasecmp(s, "west") ||
- !g_ascii_strcasecmp(s, "left"))
- o->dir = OB_DIRECTION_WEST;
- else if (!g_ascii_strcasecmp(s, "east") ||
- !g_ascii_strcasecmp(s, "right"))
- o->dir = OB_DIRECTION_EAST;
- g_free(s);
- }
-
+static gpointer setup_south_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ o->dir = OB_DIRECTION_SOUTH;
return o;
}
-static void free_func(gpointer options)
+static gpointer setup_east_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
{
- Options *o = options;
+ Options *o = g_new0(Options, 1);
+ o->dir = OB_DIRECTION_EAST;
+ return o;
+}
- g_free(o);
+static gpointer setup_west_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ o->dir = OB_DIRECTION_WEST;
+ return o;
}
static gboolean do_grow(ObActionsData *data, gint x, gint y, gint w, gint h)
+++ /dev/null
-#include "openbox/actions.h"
-#include "openbox/misc.h"
-#include "openbox/client.h"
-#include "openbox/frame.h"
-#include "openbox/screen.h"
-#include "openbox/focus.h"
-#include <glib.h>
-
-typedef struct {
- gboolean shaded_on;
- gboolean shaded_off;
- gboolean maxvert_on;
- gboolean maxvert_off;
- gboolean maxhorz_on;
- gboolean maxhorz_off;
- gboolean maxfull_on;
- gboolean maxfull_off;
- gboolean iconic_on;
- gboolean iconic_off;
- gboolean focused;
- gboolean unfocused;
- GSList *thenacts;
- GSList *elseacts;
-} Options;
-
-static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
-static void free_func(gpointer options);
-static gboolean run_func(ObActionsData *data, gpointer options);
-
-void action_if_startup(void)
-{
- actions_register("If",
- setup_func,
- free_func,
- run_func,
- NULL, NULL);
-}
-
-static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
-{
- xmlNodePtr n;
- Options *o;
-
- o = g_new0(Options, 1);
-
- if ((n = parse_find_node("shaded", node))) {
- if (parse_bool(doc, n))
- o->shaded_on = TRUE;
- else
- o->shaded_off = TRUE;
- }
- if ((n = parse_find_node("maximized", node))) {
- if (parse_bool(doc, n))
- o->maxfull_on = TRUE;
- else
- o->maxfull_off = TRUE;
- }
- if ((n = parse_find_node("maximizedhorizontal", node))) {
- if (parse_bool(doc, n))
- o->maxhorz_on = TRUE;
- else
- o->maxhorz_off = TRUE;
- }
- if ((n = parse_find_node("maximizedvertical", node))) {
- if (parse_bool(doc, n))
- o->maxvert_on = TRUE;
- else
- o->maxvert_off = TRUE;
- }
- if ((n = parse_find_node("iconified", node))) {
- if (parse_bool(doc, n))
- o->iconic_on = TRUE;
- else
- o->iconic_off = TRUE;
- }
- if ((n = parse_find_node("focused", node))) {
- if (parse_bool(doc, n))
- o->focused = TRUE;
- else
- o->unfocused = TRUE;
- }
-
- if ((n = parse_find_node("then", node))) {
- xmlNodePtr m;
-
- m = parse_find_node("action", n->xmlChildrenNode);
- while (m) {
- ObActionsAct *action = actions_parse(i, doc, m);
- if (action) o->thenacts = g_slist_prepend(o->thenacts, action);
- m = parse_find_node("action", m->next);
- }
- }
- if ((n = parse_find_node("else", node))) {
- xmlNodePtr m;
-
- m = parse_find_node("action", n->xmlChildrenNode);
- while (m) {
- ObActionsAct *action = actions_parse(i, doc, m);
- if (action) o->elseacts = g_slist_prepend(o->elseacts, action);
- m = parse_find_node("action", m->next);
- }
- }
-
- return o;
-}
-
-static void free_func(gpointer options)
-{
- Options *o = options;
-
- g_free(o);
-}
-
-/* Always return FALSE because its not interactive */
-static gboolean run_func(ObActionsData *data, gpointer options)
-{
- Options *o = options;
- GSList *acts;
- ObClient *c = data->client;
-
- if ((!o->shaded_on || (c && c->shaded)) &&
- (!o->shaded_off || (c && !c->shaded)) &&
- (!o->iconic_on || (c && c->iconic)) &&
- (!o->iconic_off || (c && !c->iconic)) &&
- (!o->maxhorz_on || (c && c->max_horz)) &&
- (!o->maxhorz_off || (c && !c->max_horz)) &&
- (!o->maxvert_on || (c && c->max_vert)) &&
- (!o->maxvert_off || (c && !c->max_vert)) &&
- (!o->maxfull_on || (c && c->max_vert && c->max_horz)) &&
- (!o->maxfull_off || (c && !(c->max_vert && c->max_horz))) &&
- (!o->focused || (c && (c == focus_client))) &&
- (!o->unfocused || (c && !(c == focus_client))))
- {
- acts = o->thenacts;
- }
- else
- acts = o->elseacts;
-
- actions_run_acts(acts, data->uact, data->state,
- data->x, data->y, data->button,
- data->context, data->client);
-
- return FALSE;
-}
static gpointer setup_func_top(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
static gpointer setup_func_bottom(ObParseInst *i, xmlDocPtr doc,
xmlNodePtr node);
-static gpointer setup_func_send(ObParseInst *i, xmlDocPtr doc,
- xmlNodePtr node);
+static gpointer setup_sendtop_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_sendbottom_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_sendnormal_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
static gboolean run_func(ObActionsData *data, gpointer options);
void action_layer_startup(void)
run_func, NULL, NULL);
actions_register("ToggleAlwaysOnBottom", setup_func_bottom, g_free,
run_func, NULL, NULL);
- actions_register("SendToLayer", setup_func_send, g_free,
+ actions_register("SendToTopLayer", setup_sendtop_func, g_free,
+ run_func, NULL, NULL);
+ actions_register("SendToBottomLayer", setup_sendbottom_func, g_free,
+ run_func, NULL, NULL);
+ actions_register("SendToNormalLayer", setup_sendnormal_func, g_free,
run_func, NULL, NULL);
}
return o;
}
-static gpointer setup_func_send(ObParseInst *i, xmlDocPtr doc,
- xmlNodePtr node)
+static gpointer setup_sendtop_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
{
- xmlNodePtr n;
- Options *o;
-
- o = g_new0(Options, 1);
+ Options *o = g_new0(Options, 1);
+ o->layer = 1;
+ o->toggle = FALSE;
+ return o;
+}
- if ((n = parse_find_node("layer", node))) {
- gchar *s = parse_string(doc, n);
- if (!g_ascii_strcasecmp(s, "above") ||
- !g_ascii_strcasecmp(s, "top"))
- o->layer = 1;
- else if (!g_ascii_strcasecmp(s, "below") ||
- !g_ascii_strcasecmp(s, "bottom"))
- o->layer = -1;
- else if (!g_ascii_strcasecmp(s, "normal") ||
- !g_ascii_strcasecmp(s, "middle"))
- o->layer = 0;
- g_free(s);
- }
+static gpointer setup_sendbottom_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ o->layer = -1;
+ o->toggle = FALSE;
+ return o;
+}
+static gpointer setup_sendnormal_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ o->layer = 0;
+ o->toggle = FALSE;
return o;
}
MaxDirection dir;
} Options;
-static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_both_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node);
+static gpointer setup_horz_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node);
+static gpointer setup_vert_func(ObParseInst *i,
+ xmlDocPtr doc, xmlNodePtr node);
static gboolean run_func_on(ObActionsData *data, gpointer options);
static gboolean run_func_off(ObActionsData *data, gpointer options);
static gboolean run_func_toggle(ObActionsData *data, gpointer options);
void action_maximize_startup(void)
{
- actions_register("Maximize", setup_func, g_free, run_func_on,
- NULL, NULL);
- actions_register("Unmaximize", setup_func, g_free, run_func_off,
- NULL, NULL);
- actions_register("ToggleMaximize", setup_func, g_free, run_func_toggle,
- NULL, NULL);
+ actions_register("MaximizeFull", setup_both_func, g_free,
+ run_func_on, NULL, NULL);
+ actions_register("UnmaximizeFull", setup_both_func, g_free,
+ run_func_off, NULL, NULL);
+ actions_register("ToggleMaximizeFull", setup_both_func, g_free,
+ run_func_toggle, NULL, NULL);
+ actions_register("MaximizeHorz", setup_horz_func, g_free,
+ run_func_on, NULL, NULL);
+ actions_register("UnmaximizeHorz", setup_horz_func, g_free,
+ run_func_off, NULL, NULL);
+ actions_register("ToggleMaximizeHorz", setup_horz_func, g_free,
+ run_func_toggle, NULL, NULL);
+ actions_register("MaximizeVert", setup_vert_func, g_free,
+ run_func_on, NULL, NULL);
+ actions_register("UnmaximizeVert", setup_vert_func, g_free,
+ run_func_off, NULL, NULL);
+ actions_register("ToggleMaximizeVert", setup_vert_func, g_free,
+ run_func_toggle, NULL, NULL);
}
-static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
+static gpointer setup_both_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
{
- xmlNodePtr n;
- Options *o;
-
- o = g_new0(Options, 1);
+ Options *o = g_new0(Options, 1);
o->dir = BOTH;
+ return o;
+}
- if ((n = parse_find_node("direction", node))) {
- gchar *s = parse_string(doc, n);
- if (!g_ascii_strcasecmp(s, "vertical") ||
- !g_ascii_strcasecmp(s, "vert"))
- o->dir = VERT;
- else if (!g_ascii_strcasecmp(s, "horizontal") ||
- !g_ascii_strcasecmp(s, "horz"))
- o->dir = HORZ;
- g_free(s);
- }
+static gpointer setup_horz_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ o->dir = HORZ;
+ return o;
+}
+static gpointer setup_vert_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ o->dir = VERT;
return o;
}
} Options;
static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_center_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node);
static void free_func(gpointer options);
static gboolean run_func(ObActionsData *data, gpointer options);
free_func,
run_func,
NULL, NULL);
+ actions_register("MoveToCenter",
+ setup_center_func,
+ free_func,
+ run_func,
+ NULL, NULL);
}
static void parse_coord(xmlDocPtr doc, xmlNodePtr n, gint *pos,
return o;
}
+static gpointer setup_center_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node)
+{
+ Options *o;
+
+ o = g_new0(Options, 1);
+ o->x = G_MININT;
+ o->y = G_MININT;
+ o->w = G_MININT;
+ o->h = G_MININT;
+ o->monitor = -1;
+ o->xcenter = TRUE;
+ o->ycenter = TRUE;
+ return o;
+}
+
static void free_func(gpointer options)
{
Options *o = options;
ObDirection dir;
} Options;
-static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
-static void free_func(gpointer options);
+static gpointer setup_north_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node);
+static gpointer setup_south_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node);
+static gpointer setup_east_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node);
+static gpointer setup_west_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node);
static gboolean run_func(ObActionsData *data, gpointer options);
void action_movetoedge_startup(void)
{
- actions_register("MoveToEdge",
- setup_func,
- free_func,
- run_func,
+ actions_register("MoveToEdgeNorth", setup_north_func, g_free, run_func,
+ NULL, NULL);
+ actions_register("MoveToEdgeSouth", setup_south_func, g_free, run_func,
+ NULL, NULL);
+ actions_register("MoveToEdgeEast", setup_east_func, g_free, run_func,
+ NULL, NULL);
+ actions_register("MoveToEdgeWest", setup_west_func, g_free, run_func,
NULL, NULL);
}
-static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
+static gpointer setup_north_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node)
{
- xmlNodePtr n;
- Options *o;
-
- o = g_new0(Options, 1);
+ Options *o = g_new0(Options, 1);
o->dir = OB_DIRECTION_NORTH;
+ return o;
+}
- if ((n = parse_find_node("direction", node))) {
- gchar *s = parse_string(doc, n);
- if (!g_ascii_strcasecmp(s, "north") ||
- !g_ascii_strcasecmp(s, "up"))
- o->dir = OB_DIRECTION_NORTH;
- else if (!g_ascii_strcasecmp(s, "south") ||
- !g_ascii_strcasecmp(s, "down"))
- o->dir = OB_DIRECTION_SOUTH;
- else if (!g_ascii_strcasecmp(s, "west") ||
- !g_ascii_strcasecmp(s, "left"))
- o->dir = OB_DIRECTION_WEST;
- else if (!g_ascii_strcasecmp(s, "east") ||
- !g_ascii_strcasecmp(s, "right"))
- o->dir = OB_DIRECTION_EAST;
- g_free(s);
- }
-
+static gpointer setup_south_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ o->dir = OB_DIRECTION_SOUTH;
return o;
}
-static void free_func(gpointer options)
+static gpointer setup_east_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node)
{
- Options *o = options;
+ Options *o = g_new0(Options, 1);
+ o->dir = OB_DIRECTION_EAST;
+ return o;
+}
- g_free(o);
+static gpointer setup_west_func(ObParseInst *i, xmlDocPtr doc,
+ xmlNodePtr node)
+{
+ Options *o = g_new0(Options, 1);
+ o->dir = OB_DIRECTION_WEST;
+ return o;
}
/* Always return FALSE because its not interactive */
--- /dev/null
+#include "openbox/actions.h"
+#include "openbox/client.h"
+
+static gboolean run_func_sl(ObActionsData *data, gpointer options);
+static gboolean run_func_ur(ObActionsData *data, gpointer options);
+
+void action_shadelowerraise_startup()
+{
+ actions_register("ShadeLower", NULL, NULL, run_func_sl, NULL, NULL);
+ actions_register("UnshadeRaise", NULL, NULL, run_func_ur, NULL, NULL);
+}
+
+/* Always return FALSE because its not interactive */
+static gboolean run_func_sl(ObActionsData *data, gpointer options)
+{
+ if (data->client) {
+ actions_client_move(data, TRUE);
+ if (data->client->shaded)
+ stacking_lower(CLIENT_AS_WINDOW(data->client));
+ else
+ client_shade(data->client, TRUE);
+ actions_client_move(data, FALSE);
+ }
+ return FALSE;
+}
+
+/* Always return FALSE because its not interactive */
+static gboolean run_func_ur(ObActionsData *data, gpointer options)
+{
+ if (data->client) {
+ actions_client_move(data, TRUE);
+ if (data->client->shaded)
+ client_shade(data->client, FALSE);
+ else
+ stacking_raise(CLIENT_AS_WINDOW(data->client));
+ actions_client_move(data, FALSE);
+ }
+ return FALSE;
+}
{ "Left", "AllDesktops", OB_MOUSE_ACTION_CLICK, "Raise" },
{ "Left", "Shade", OB_MOUSE_ACTION_CLICK, "Raise" },
{ "Left", "Close", OB_MOUSE_ACTION_CLICK, "Close" },
- { "Left", "Maximize", OB_MOUSE_ACTION_CLICK, "ToggleMaximize" },
+ { "Left", "Maximize", OB_MOUSE_ACTION_CLICK, "ToggleMaximizeFull" },
{ "Left", "Iconify", OB_MOUSE_ACTION_CLICK, "Iconify" },
{ "Left", "AllDesktops", OB_MOUSE_ACTION_CLICK, "ToggleOmnipresent" },
{ "Left", "Shade", OB_MOUSE_ACTION_CLICK, "ToggleShade" },
return OB_FRAME_CONTEXT_TOP;
else if (!g_ascii_strcasecmp("Bottom", name))
return OB_FRAME_CONTEXT_BOTTOM;
+ else if (!g_ascii_strcasecmp("Handle", name))
+ return OB_FRAME_CONTEXT_BOTTOM;
else if (!g_ascii_strcasecmp("Left", name))
return OB_FRAME_CONTEXT_LEFT;
else if (!g_ascii_strcasecmp("Right", name))