Commit graph

7594 commits

Author SHA1 Message Date
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
effa8667e1 Include rsvg-cairo.h for cairo-specific things 2013-12-02 11:35:44 -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
Dana Jansens
aa1fe695a5 window.inactive.label.text.color should default to white.
Currently it defaults to itself, which is NULL, and causes a crash.

The spec http://openbox.org/wiki/Help:Themes#window.inactive.label.text.color
claims that the default is white.

In 98b02c6b60 we had this property being read
twice, once with the NULL backup and once with white. It seems that we kept
the wrong one, so just switching this to white now.
2013-08-11 16:15:12 -04:00
Dana Jansens
f3873cac4a Fix a write out of bounds in splitvertical gradients (Bug 3612)
If the gradient has height 1, then y1sz is 0. We don't want to use the
first color and move the data pointer, since this will move it past the
end of the array.
2013-08-11 16:15:12 -04:00
Dana Jansens
cddd736de5 We use congfigure.ac not configure.am 2013-08-11 14:43:48 -04:00
Dana Jansens
bcfe59fce2 Fix some compiler warnings
Void function should actually be declared void. Not-reached switch
condition should still return something.
2013-08-11 14:43:23 -04:00
Dana Jansens
b4b780bae6 Update line numbers in po files 2013-08-11 13:48:37 -04:00
Mikael Magnusson
7c4fae0312 Change "plain" to "exact" for If's <title> 2013-08-11 13:44:48 -04:00
Mikael Magnusson
eae7a57088 Update CHANGELOG 2013-08-11 13:44:13 -04:00
Mikael Magnusson
bced74beaa Add matching which monitor the client is on in the If action (Bug 5426) 2013-08-11 13:41:38 -04:00
Mikael Magnusson
f8aa8cf5bb Use enum value for monitor in MoveToCenter 2013-08-11 13:39:27 -04:00
Mikael Magnusson
db1c0809ef Let the If action match window titles with GRegex 2013-08-11 13:38:16 -04:00
Mikael Magnusson
5a1da743ca Use a helper function to make if.c a bit shorter 2013-08-11 13:34:01 -04:00
Mikael Magnusson
9614dd8da2 Add activedesktop to If 2013-08-11 13:27:26 -04:00
Lefteris Chatzimparmpas
2b1a53cd73 Dock used showDelay for both hiding and showing (Bug 5811) 2013-08-11 13:13:41 -04:00
Mikael Magnusson
b2b5df767c Allow specifying only one of width and height in per-app settings size
Fixes bug 5819.
2013-08-11 13:07:49 -04:00
Mikael Magnusson
937ba3c7e7 Fix use after free in error message 2013-08-11 12:04:13 +02:00
Mikael Magnusson
f55caaf6a0 Add some comments in MoveResizeTo code 2013-08-11 12:04:11 +02:00
Dana Jansens
16c0fb84bc Remove fuzzy and outdated translations, add plural expressions.
Clean up the .po files for this release. Plural expressions are needed in
all files that have plurals. And replace fuzzy (incorrect) translations
with empty ones instead.
2013-08-11 00:46:48 -04:00
Dana Jansens
677fb42644 Make nplurals=2 in Turkish translation since there are plurals translations
The plural should be a c expression that says if n is plural or not.
2013-08-11 00:21:10 -04:00
Dana Jansens
23c6a8c90c Remove po_PL from LINGUAS as that doesn't exist, should have be pl.po 2013-08-11 00:18:10 -04:00