summaryrefslogtreecommitdiff
path: root/openbox/config.c
AgeCommit message (Collapse)Author
2014-10-28Initialize some stuff to 0 before taking their addressMikael Magnusson
2014-10-23Change some while loops to for loops in config.cMikael Magnusson
2014-10-23Allow specifying several mousebinds in one go, like for keybindsMikael Magnusson
Also fixes minor indent error
2014-10-20Add keyboard/rebindOnMappingNotify optionMikael Magnusson
I have to switch to a qwerty layout to play steam games, and every time I switch back and forth, we lose some random bindings so I also had to reconfigure Openbox every time, now I don't.
2013-09-01Add the old <center> option for the placement policy. (Bug 5946)Ian Zimmerman
Original commit messages: . Reformat to move closer to house style . Add center on top of leat overlap place algo . Add sentinel value to edge arrays . Use a Size instead of a Rect for a centering field . Fix off by one bug . Need to declare dx and dy . Pass length of edge array instead of recomputing . Fix missing open-brace in config.c . Address the more trivial subset of danakj comments . Revert "Remove now-unused config_place_center option." This reverts commit 5e282dae08be3b900e0337efa0fae8f3ffa92cd7. . Remove reliance on sentinel value when scanning edge arrays . Avoid need to initialize Size structure by removing it :) . Clean up field expansion code somewhat . Compress code further by using a structure for common args . Fix search for next grid point . Squeeze it even more by not using Size at all
2013-08-11Allow specifying only one of width and height in per-app settings sizeMikael Magnusson
Fixes bug 5819.
2013-08-10Change the message about no icons in menus.Dana Jansens
The message used to mention Imlib2, but now there are two libraries that can be used to support icons. So make the message more generic and show it only when both libraries are not present.
2012-10-06Refactor the per-app parsing code into a helper function and reduce nesting ↵Dana Jansens
by 2 levels
2012-10-06Allow application rules to control window size (Fix bug 4661)Dana Jansens
Use the following in your per-app rules: <size> <width>A</width> <height>B</height> </size> A and B can be integer values to specify a size in pixels. They can also be percentages or fractions to be relative to the size of the monitor the window is placed on.
2012-10-06Remove now-unused config_place_center option.Dana Jansens
The new LeastOverlap placement doesn't use this option, and it kind of defeats the purpose of the algorithm.
2012-10-06Allow window matching based on the group leader's name and class (Fix bug 5721)Dana Jansens
In Openbox 3.4 we used the group leader's WM_CLASS value when it was available. This prevents windows in the group from overriding with a specific value, however which is bad. More rationale can be found in http://icculus.org/pipermail/openbox/2010-September/006790.html Some applications (eg. Firefox) use command line flags to set the WM_CLASS property on the group leader but do not change the property on the mapped windows themselves. This makes matching these windows not possible in Openbox 3.5. We resolve this by exposing the group's WM_CLASS values alongside the individual window's values. We add _OB_APP_GROUP_NAME and _OB_APP_GROUP_CLASS properties along with "groupname" and "classname" attributes for the rc.xml application tag.
2012-10-06Make LeastOverlap placment replace the behaviour of Smart and address style nitsDana Jansens
2012-10-06LeastOverlap placement option (Fix bug 5385)Ian Zimmerman
Adds a new placement algorithm that finds a place on the monitor that overlaps the least amount of windows as possible. Original patch by Ian Zimmerman <itz@buug.org>. Port to Openbox 3.5 by David Vogt <dv@adfinis.c>.
2011-10-16respect the active/mouse options for monitor placement, and use ↵Dana Jansens
ObMonitorPlace for per-app too
2011-10-16Allow per-app settings to pick a monitor for a window without choosing a ↵Dana Jansens
position in it.
2011-10-16Add "active" and "primary" options to the <monitor> placement option for ↵Dana Jansens
per-app settings (bug #5180)
2011-10-16Change default doubleclick timeout to 500ms and keep track of where last ↵Mikael Magnusson
click was Bug #5152 - "mouse double-click time is too low by default - 200ms" We only use the doubleclick in one place in the default configuration, for doubleclicking titlebars to maximize windows, so any negative impact of increasing the timeout should be minimal, especially with the addition of requiring the two clicks to be in the same place. Doubleclicks are hardcoded to occur within 8 pixels for now, it doesn't seem worth it to add a config until someone complains. A possibility is using the drag threshold, but some people have that set very low so it could be hard to doubleclick then.
2011-01-24Big changes to placement across multiple monitors.Dana Jansens
Add a Primary option for which monitor to place new windows on. Make "Active" the default instead of "Any", which is just totally crazy. When a window is being placed in the FOREGROUND, use a monitor chosen in the following order: 1. same monitor as parent 2. primary monitor if placement=PRIMARY active monitor if placement=ACTIVE pointer monitor if placement=MOUSE 3. primary monitor 4. other monitors where the window has group members on the same desktop 5. other monitors where the window has group members on other desktops 6. other monitors When a window is being placed in the BACKGROUND, use a monitor chosen in the following order: 1. same monitor as parent 2. other monitors where the window has group members on the same desktop 2a. primary monitor in this set 2b. other monitors in this set 3. other monitors where the window has group members on other desktops 3a. primary monitor in this set 3b. other monitors in this set 4. other monitors 4a. primary monitor in this set 4b. other monitors in this set Decide to focus the new window before placing it, so we know if it will be placed in the foreground or background. Always choose a single monitor, then place on it, rather than possibly moving to a "backup" monitor. Unpredictable monitor placement is horrible.
2011-01-24mem leak in config.cDana Jansens
2011-01-24Parse multiple keys in one keybindDana Jansens
2010-09-16Fix a double free when you have a mousebind without a button attributeMikael Magnusson
Introduced in f307a3feabedd9bcadeaafd0fa8e1b1a60736eb2
2010-09-16Continue parsing contexts when an unsupported one is encounteredMikael Magnusson
2010-05-17allow multiple contexts separated by space in a mouse bindingDana Jansens
example: context="Top Left Right Bottom"
2010-05-17Add support for using relative expressions in move and resize actionsMikael Magnusson
Have MoveResizeTo use config_parse_gravity_coord instead of duplicating it locally Allow MoveResizeTo positions and sizes and per app positions to be relative to screen size Rename to config_parse_relative_number so it can be used for sizes too Add relative numbers to width/height in MoveResizeTo Add relative numbers to MoveRelative Add relative numbers to ResizeRelative, these are for the client size, not screen size
2010-04-16allow warping the mouse pointer when switching desktops by bumping into the ↵Dana Jansens
edge of the monitor with a window based on a patch by Nathaniel Gephart <computinchuck@gmail.com>
2010-02-16lower the default submenu show delayDana Jansens
2010-02-16more using g_slice_new() instead of g_new()Dana Jansens
2010-01-28Init all fonts to NULL, so if they arent in the config they use the default fontDana Jansens
2010-01-14allow app rules to match windows by their title when mappingDana Jansens
and save the title in the _OB_APP_TITLE property
2010-01-10allow application rules to place transient/dialog/splash windows, and allow ↵Dana Jansens
application rules to match only on the role or type if you wish.
2010-01-08Rework the code provided by Kadlcik Libor for loading/showing icons in ↵Dana Jansens
Openbox menus. This changes how the imagecache works, you can load an image into it directly, or you can load it by name (then it will load it from a file on disk). NOTE: The name part is incomplete, as it needs to use the freedesktop.org icon spec to search for the right file. Also to resize it should look for another icon on disk with the same name but different size (icon themes).
2010-01-08This patch implements support for icons in user-defined menus into OpenboxKadlcik Libor
Image loading is done using the Imlib2 library. I chose Imlib2 because it's pretty fast, it's easy to use, supports many file formats (tested xpm, gif, jpeg, png) and doesn't introduce too much bloat (it depends :)). I ported the patch to 3.4.7-pre3 and added some enhancements. Caching is much better now, and icons can be disabled at compile time using --disable-imlib2 option. What's new? Syntax of configuration files (namely rc.xml and menu.xml) has been changed slightly to allow users to associate icons to menu entries. This is done by specifying path to icon file in the new "icon" attribute in "<item>" element, e.g: <item label="Vim" icon="/usr/share/pixmaps/vim-32.xpm"> <action name="Execute"><execute>x-terminal-emulator -T Vim -e vim</execute></action> </item> If user doesn't want to display any icons in his user-defined menus, he/she can disable icons in rc.xml, inside "<menu>" section: <menu> ... <showIcons>no</showIcons> ... </menu> Default value is "yes". (New boolean variable "config_menu_user_show_icons" has been added to source code.) An icon is loaded (using menu_item_attach_icon()) when a new entry of menu is created. Fortunately, I haven't notice any performance problems because of this :).
2010-01-08Merge branch 'backport' into workDana Jansens
Conflicts: Makefile.am openbox/actions/focus.c openbox/config.c openbox/event.c openbox/menuframe.c
2010-01-06Some fixes for the submenu hide delay codeDana Jansens
When nothing in a menu is selected, go back to selecting the open submenu. Adjust the LeaveNotify event handling to only respond when there is not a EnterNotify coming for the same menu frame. Change the default submenu show/hide delays. Have the default values for submenu show/hide match the default rc.xml
2010-01-06improve submenu hide delayAlexey Korop
2009-12-21rename the obt_parse library to obt_xml (since it is very xml specific)Dana Jansens
2009-12-21make a config option for the inactive osd fontDana Jansens
2009-12-18Add a focus option, unfocusOnLeave that removes focus from a window when the ↵Dana Jansens
pointer leaves it This uses the same delay to unfocus as is used for focusing on enter
2009-12-11Merge branch 'backport' into workDana Jansens
Conflicts: openbox/config.c openbox/event.c openbox/prop.c openbox/prop.h openbox/screen.c openbox/screen.h
2009-12-09Add a primaryMonitor config option, where the focus-cycle and keychain ↵Dana Jansens
popups will appear
2009-12-09Set a minimum value for the screenEdgeWarpTime for 25ms.Dana Jansens
When this is very small it just gives X/Openbox a heart attack and ends up going forever. Even 25 is quite too fast to be usuable so it should be a good minimum.
2009-11-21Revert all commits for the Hooks feature to move it to a topic branch.Dana Jansens
This reverts commit fd2f617be7ff57fcb187daa737f66d243544c8cd. This reverts commit a47d0a53652a96ca1df96fc9268757df1431ae55. This reverts commit a1908e076736e1a618bd305c5963dbfecaa30497. This reverts commit dc2e6f6bf7143a56de360a393b33906735e63625. This reverts commit 985e7dadf9a3ebf4bd265d955c3198e96405e5d2. This reverts commit db781556d63d1a50bd1b1b4b6b5423ef703bf2c7. This reverts commit feec8f663f0a11546c2da87575fecc8a88d97ca1.
2009-11-07Make clang happierMikael Magnusson
Add asserts to default: in switch statements Store pointed to variables locally so it knows they don't change Remove some dead assignments Mark ob_exit_with_error as noreturn Use "%s", msg instead of just msg to printf style functions Use the c_pfocus variable
2009-02-20Merge branch 'backport' into workMikael Magnusson
Conflicts: openbox/config.c
2009-02-20Fix per-app monitor settingMikael Magnusson
A couple of things were wrong, the parser added 1 to the value despite expecting the user to give values in the range of 1 to screen_num_monitors, rc.xml documented the values to start from 0 and finally the monitor value wasn't copied over at all when matching the client.
2008-04-23Merge branch 'backport' into workMikael Magnusson
Conflicts: openbox/config.c openbox/keyboard.c openbox/moveresize.c
2008-04-02Move "if"s out of the loop and rewrite the loop to use parse_find_node() to ↵Kadlcik Libor
search for "file".
2008-03-13Make alt-tab icon size configurable.Mikael Magnusson
2008-02-29Add a hook system. They hooks don't run yet but they parse from the config ↵Dana Jansens
file.
2008-02-21Merge branch 'backport' into workDana Jansens
Conflicts: openbox/openbox.c openbox/session.c