Commit graph

7563 commits

Author SHA1 Message Date
Mikael Magnusson
088524f016 Use GString for appending strings
It can take a very long time to print a _NET_WM_ICON property for firefox with the previous code, several minutes. Fixes bug #6042 and also implements the change for append_string.
2014-10-28 04:14:24 +01:00
Edward Sheldrake
26951b0d4c Fix use after free in menu_entry_frame_free 2014-10-28 04:14:24 +01:00
Pascal Terjan
130075de74 Fix copy paste typo in swap_byte_order 2014-10-28 04:14:24 +01:00
Mikael Magnusson
7a6c559948 Update CHANGELOG with changes so far 2014-10-28 04:14:24 +01:00
Mikael Magnusson
bcfc71a673 Make desktop actions noninteractive 2014-10-28 04:14:24 +01:00
Mikael Magnusson
8543e5746c Remove freshmeat related stuff from release script, the site is dead 2014-10-28 04:14:23 +01:00
Mikael Magnusson
bf5357f9fb Clip client rect to monitor bounds while picking a corner for resizing
This way you can actually do everything to it when it's offscreen,
not just resize the one edge that's poking out
2014-10-28 04:14:23 +01:00
Mikael Magnusson
fe6453b40b Change some while loops to for loops in config.c 2014-10-23 23:45:38 +02:00
Mikael Magnusson
d6985fd996 Allow specifying several mousebinds in one go, like for keybinds
Also fixes minor indent error
2014-10-23 23:11:27 +02:00
Mikael Magnusson
6273bf2e94 Make RaiseLower work for the dock as well
As a side effect, _NET_RESTACK_REQUEST now also allows specifying the dock as the sibling.
2014-10-20 10:28:00 +02:00
Mikael Magnusson
7b3dc69468 Add keyboard/rebindOnMappingNotify option
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.
2014-10-20 10:28:00 +02:00
Mikael Magnusson
39dfb7458a Pass the GravityPoint as const* instead of by value 2014-10-11 02:13:49 +02:00
Mikael Magnusson
d3359676e4 Let the menu placement code know if the position was user specified
This way, it can avoid running the code that moves it to a good position
relative to a mouse that isn't there
2014-10-06 22:05:26 +02:00
Mikael Magnusson
1b3afcff1f Move common gravity application to screen.c 2014-10-06 22:05:26 +02:00
Mikael Magnusson
c5c5b7b455 Resolve gravity coords in menuframe so it can use the widths 2014-10-06 22:05:26 +02:00
Mikael Magnusson
238ab3f742 Add <position> tag to ShowMenu action 2014-10-06 22:05:26 +02:00
Mikael Magnusson
2d289312ba Fix negative relative coordinate placement 2014-10-06 22:05:26 +02:00
Mikael Magnusson
e02c2f4174 double space 2014-10-06 22:05:26 +02:00
Mikael Magnusson
1ea131048d Fix thinko in if.c, *o in Stop can never be pointing at the right place.
Use a file static boolean instead.
2014-04-25 00:27:06 +02:00
Mikael Magnusson
d8f1ef057b Fix typo in variable name 2014-04-10 22:51:55 +02:00
Mikael Magnusson
76113b8a06 Avoid initializing a VLA of 0 length 2014-04-10 22:29:01 +02:00
Mikael Magnusson
9fb4b56ba9 Declare variables at start of blocks in place.c 2014-04-10 22:29:01 +02:00
Mikael Magnusson
f469a46da1 Break loop if is_true was set to false in If 2014-04-10 22:29:01 +02:00
Mikael Magnusson
a8a2375c44 Don't segfault when there's no target in If 2014-04-10 22:29:01 +02:00
Mikael Magnusson
835ef3253f Some fixes in french translation 2014-04-10 22:29:01 +02:00
Derek Foreman
540c53eeab Cache results of offset/shift functions so we don't do 6 function calls per pixel when reducing color depth 2014-04-10 22:29:01 +02:00
Rafael Ignacio Zurita
33caeb559e Fix gcc warnings in screen.c 2014-01-09 14:56:34 -05:00
Markus Roesch
c7a458b5ad Added missing break statement (Bug 6043) 2014-01-09 14:55:09 -05:00
Dana Jansens
7b408bc3b8 Add a strict option to the ToggleShowDesktop action
When the strict option is used, normal windows are not able to show themselves
while showing the desktop.
2013-09-09 10:47:43 -04:00
Sérgio Marques
adcb7a78d9 Portuguese update for openbox 2013-09-08 11:43:56 -04:00
Dana Jansens
e6a0beb34b Allow FillToEdge to grow when all its edges are blocked.
This change points out how useless the return value from client_find_resize_directional()
was, so it also removes that.

When all edges are blocked, the FillToEdge action will try to grow all four edges agin
without blocking any of them on their current edge. This more closely matches the
behaviour of the GrowToEdge action.
2013-09-02 14:10:37 -04:00
Dana Jansens
f5e9df18a4 Clean up the FillToEdge action implementation
This extend the client_find_resize_directional() method to support
two growing modes, and return a bool for whether it was able to grow/shrink.

The client_find_resize_directional() method now takes an enum instead
of a bool, with two growing modes. The old mode which always tries to
grow, the a new mode that will only grow if the client's edge is not
already at a grow stopping point (ie against the edge of another window).
2013-09-02 14:10:37 -04:00
Lucas Augusto Deters
f757e7449f Created a 'GrowToFill' action. (Bug 3356) 2013-09-02 14:10:37 -04:00
Dana Jansens
e33c070d15 Use the BSEARCH() macro in overlap placement
Currently the code rolls its own binary search, but now that we have
a well-tested binary search implementation in obt/ we can make use
of that.
2013-09-02 14:10:37 -04:00
Dana Jansens
047a201498 Fix bugs and add unit tests for BSEARCH()
Also adds running unit tests to the release/go script so we can be
sure that all tests pass before we make a release.
2013-09-01 15:15:53 -04:00
Dana Jansens
4c07127074 Fix nits for overlap placement center option 2013-09-01 15:09:03 -04:00
Ian Zimmerman
f866c034bf Add the old <center> option for the placement policy. (Bug 5946)
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 5e282dae08.
. 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-09-01 15:09:03 -04:00
Ian Zimmerman
9750e5cea8 Fix gcc warnings 2013-09-01 15:09:03 -04:00
Tom Sires
0afb5b28c6 Fix a typo causing submenuShowDelay to be ignored (Bug 6019) 2013-09-01 11:22:31 -04:00
Mikael Magnusson
0a7ff45e49 Add window type to If as well
This one required some extra helpers so is separate commit
2013-08-19 21:35:45 +02:00
Mikael Magnusson
1d1fe5e6cc Allow matching class, name and role in If action 2013-08-19 21:35:44 +02:00
Mikael Magnusson
780b2428a2 Add ForEach action which is like If but runs on all clients
Also adds a Stop action that lets you stop running, in case you only
want to run actions on the first match.
2013-08-19 21:35:44 +02:00
Dana Jansens
2d5239b60a Remove the else-on-newline rule from HACKING 2013-08-18 20:04:16 -04:00
Dana Jansens
881076d2a8 Add queries to If actions
This allows the If action to run queries against a client other than
the target of the actions being run, for example to check state on
the focused window while performing actions on another window during
focus cycling.

The syntax looks like

<action name="If">
  <query target="default">
    <title>FooBar</title>
    <maximized>yes</maximized>
  </query>
  <query target="focus">
    <desktop>3</desktop>
  </query>
  <then>
   <action name="NextDesktop"/>
  </then>
</action>

The above checks the client window that the actions will run on to
verify that its title is "FooBar" and that it is maximized. If that
is true, it also checks that the currently focused client window is
on desktop 3. If that is true also, then it runs the NextDesktop
action.

The target="" option can be set to "default" which uses the client
window that the actions will run on, or it can be "focus" which uses
the client window that is currently focused.

The <query> tag is optional, and the conditions inside the query can
be placed directly inside the If <action> tag, as they were before
this change. In that case, a default <query> tag is assumed with
target="default" which matches the previous behaviour.

Multiple <query> tags can be present, and they must all be true in
order to run the actions in <then>. If any one is false, the actions
in <else> will be run instead.
2013-08-18 20:04:16 -04:00
Dana Jansens
98c5205b9e Update HACKING for brace rules
The rules in HACKING for braces are kind of unclear, so add some
more rules and provide examples too.
2013-08-18 20:04:16 -04:00
Dana Jansens
f4bad155be Add a note to add the version to the bug tracker for new releases.
Also important to update IRC and keep hydrated.
2013-08-18 20:04:16 -04:00
Dana Jansens
1a9f697fe9 Update po files for 3.5.2 2013-08-11 21:30:20 -04:00
Dana Jansens
1d34e17102 Add CHANGELOG for 3.5.2 2013-08-11 21:28:22 -04:00
Dana Jansens
1f614a70a5 Update version in configure.ac to 3.5.2
No library interfaces were changed since 3.5.1.
2013-08-11 21:26:08 -04:00
Dana Jansens
db212a4f01 Maximized undecored windows have incorrect top border. (Bug 5996)
If the window has no border since the theme has bwidth=0, or because the
window is truly undecorated via MWM hints, then we should not allocate space
for the frame of the window which will just be empty pixels.
2013-08-11 16:38:20 -04:00