Following the reproduction instructions from
https://github.com/i3/i3/issues/3242#issuecomment-436175346
For me, #3242 happened when the following sequence executed:
1. Fullscreening window correctly calls `stop_child()` in
6e24e2ad6f/i3bar/src/xcb.c (L685)
2. Xrandr change, `reconfig_windows()` is called and `output->visible` is
set to `true` in this line:
6e24e2ad6f/i3bar/src/xcb.c (L1791)
3. When the window's fullscreen is disabled,
`handle_visibility_notify()` returns in this line:
6e24e2ad6f/i3bar/src/xcb.c (L677)
because previously `output->visible` was set to `true`
To fix this, I call `cont_child()` more leniently since it is a no-op
when the child is not stopped.
Fixes#3242Closes#3761
Before this commit, large workspace numbers treated oddly:
$ i3-msg 'rename workspace to 1234567890'
# displayed in i3bar as `0`
$ i3-msg 'rename workspace to 4294967200'
$ i3-msg -t get_workspaces | jq '.[]|select(.focused).num'
-96 # int32_t overflow
$ i3-msg 'rename workspace to 99999999999999999999'
$ i3-msg -t get_workspaces | jq '.[]|select(.focused).num'
-1 # treated as unnumbered
This commit puts a consistent limit on workspace numbers. Now
workspaces with numbers beyond INT32_MAX are treated as unnumbered.
* clang-format: bring back ForeachMacros
ForeachMacros was disabled in 4211274fcd
due to the breakage of include/queue.h. The currently used version,
clang-format-6.0 doesn't break it.
* Add curly braces
Co-authored-by: Orestis Floros <orestisflo@gmail.com>
This change introduces support for four new properties on the i3bar
protocol, namely "border_top", "border_right", "border_bottom"
and "border_left".
If a block is drawn with a border, these values define the width of
the corresponding edge in pixels. They all default to 1 if not
specified to preserve compatibility.
fixes#3722
We introduce a --transparency flag for i3bar in order to enable a mode which
supports the use of RGBA colors.
An important constraint here is that tray icons will always have
a fully transparent background.
fixes#3723
c2a1b6e9 was a bit overzealous, other actions should be executed if the
button was pressed after the workspace buttons but before the
statusline.
Also, should we allow other actions everywhere in the bar if click
events are disabled by the child?
Also fixes an issue where action would be called if the button press was
on a separator. For example, if a user scrolled on a separator, the
workspace would change.
Applies to --release commands as well.
Fixes#1329Fixes#3317 (duplicate)
Examples where the tray "disappeared":
- Start without a "tray_output", reload config with "tray_output none",
remove "tray_output none" and reload.
- Start with "tray_output primary" (or "tray_output <output>"), disable
the primary output and then reconnect it.
Fixes#2010
Cached in output_for_tray
Fixes for undefined behaviour on signed shift
Change literal 1 to unsigned to allow safe bitshift of 31.
Caught by cppcheck.
Make 0xFF unsigned to prevent a left shift into signed bit.
Spotted by @orestisf1993
Now clicks begin at the start of the "actual" block, offsets and
separators don't trigger click events. The width property is now just
the width of the block, including border.
Fixes#3380.
This fixes a new warning from GCC 8.1, -Wstringop-truncation:
https://gcc.gnu.org/gcc-8/changes.htmlhttps://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/Warning-Options.html#index-Wstringop-truncation
Replacing with memcpy is what gcc suggests:
> As another example, the following call to strncpy results in copying
> to d just the characters preceding the terminating NUL, without
> appending the NUL to the end. Assuming the result of strncpy is
> necessarily a NUL-terminated string is a common mistake, and so the
> call is diagnosed. To avoid the warning when the result is not
> expected to be NUL-terminated, call memcpy instead.
> void copy (char *d, const char *s)
> {
> strncpy (d, s, strlen (s));
> }
When i3bar is called with the -V flag but there is no 'verbose yes'
directive in the bar {} config, the verbosity config value is reset.
This will introduce the opposite, negligible issue: you can't disable
i3bar's verbosity by deleting the 'verbose yes' directive in the bar {}
config. To fix this we would need an enum for config.verbose.
Closes#3220.
i3bar’s X11 output is not what our testcases are testing — the state
manipulations which i3bar triggers via IPC messages to i3 are what we are
interested in.
Add support for relative coordinates in i3bar click events
Rename {x,y}_rel to relative_{x,y}
Update i3bar-protocol doc to mention the added fields in click events
i3bar's handle_button is modified to also handle XCB_BUTTON_RELEASE
events. During these button release events, only custom commands are
checked to avoid sending multiple workspace ipc messages.
The way this patch is implemented will allow to assign a custom command
for both the press and release of the same button:
bar {
...
bindsym buttonX exec command1
bindsym --release buttonX exec command2
}
Fixes#3068.
In i3bar/src/config.c we compare string lengths agains magic numbers.
This change replaces those numbers with the lengths of the strings they
represent.