Age | Commit message (Collapse) | Author |
|
Fixes #5476
|
|
Co-authored-by: Orestis Floros <orestisflo@gmail.com>
|
|
Enforces a rule that we have followed for years now. Yes, the diff is
quite big but we get it over with once and we prevent having to nit-pick
future PRs.
|
|
|
|
Closes #3818 (parent issue)
Fixes #1808
Fixes #2333
Fixes #2617
Fixes #3548
|
|
|
|
related to https://github.com/i3/i3/issues/3724
related to https://github.com/i3/i3/pull/4288
fixes https://github.com/i3/i3/issues/3721
|
|
related to https://github.com/i3/i3/issues/3724
related to https://github.com/i3/i3/issues/3721
In a follow-up commit, we can evolve this into the padding directive as
discussed on issue #3721.
|
|
|
|
* remove Xlib import from i3bar
* remove unused Xlib declarations
|
|
|
|
xcb_flush() flushes xcb's output buffer. Thus, after this call, all
previous requests are surely written to the connection with the X11
server.
xcb_aux_sync() synchronises with the X11 server. It makes sure all
previous requests were sent to the X11 server and already processed. It
does this via free(xcb_get_input_focus_reply(xcb_get_input_focus())): It
sends a request and waits for its reply. It is guaranteed that the X11
server processes requests in-order.
This means that the sequence xcb_flush(); xcb_aux_sync() first writes
whatever is in the output buffer and then does another write for the
four bytes of the GetInputFocus request from xcb_aux_sync().
Put differently: xcb_flush(); xcb_aux_sync() doesn't do anything more
than just xcb_aux_sync(). In fact, it has slightly more overhead for the
same result.
Thus, this commit drops all calls to xcb_flush() immediately after
xcb_aux_sync().
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
|
|
|
|
got_output_reply() requests this information anyway and if it is
received before the output reply, the information will be erased by
get_output_reply().
|
|
|
|
|
|
Instead of erroring, request the list of bar configs from i3 and use the
first one.
|
|
|
|
Added a new output option `nonprimary` that causes the bar to be
displayed on all outputs except the primary one.
Fixes #4083
|
|
Currently i3bar click events provide x and y coordinates relative to all monitors.
I've added coordinates relative to the current output.
+-----------+-----------+
| | i3bar |
| +-----------+
| HDMI-0 | DP-0 |
| 1920x1080 | 2560x1080 |
+-----------+-----------+
When you click in the top right corner of the DP-0,
i3bar will provide something like this:
{
"x": 4480,
"y": 10,
"output_x": 2560,
"output_y": 10,
}
This is useful for creating a rofi menu or something else.
rofi -show run -location 1 -xoffset ${I3_OUTPUT_X} -yoffset ${I3_OUTPUT_Y}
|
|
This commit removes line breaks and extra empty lines introduced in
commit fff3f79da9a87a1f790c6328f6615422f2b69b47.
|
|
Fixes #4159
Fixes #4162
|
|
|
|
The `*_free_*` calls in this branch:
https://github.com/i3/i3/blob/51b0583578ecb8ccdb264dca9a0c7f64afca60be/i3bar/src/xcb.c#L1854
are never called when we remove the output from the tailq during a
refresh.
Fixes #4123
|
|
|
|
The `*_free_*` calls in this branch:
https://github.com/i3/i3/blob/51b0583578ecb8ccdb264dca9a0c7f64afca60be/i3bar/src/xcb.c#L1854
are never called when we remove the output from the tailq during a
refresh.
Fixes #4123
|
|
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
https://github.com/i3/i3/blob/6e24e2ad6f4b1e32cfa27805a3a948d0de50f3b1/i3bar/src/xcb.c#L685
2. Xrandr change, `reconfig_windows()` is called and `output->visible` is
set to `true` in this line:
https://github.com/i3/i3/blob/6e24e2ad6f4b1e32cfa27805a3a948d0de50f3b1/i3bar/src/xcb.c#L1791
3. When the window's fullscreen is disabled,
`handle_visibility_notify()` returns in this line:
https://github.com/i3/i3/blob/6e24e2ad6f4b1e32cfa27805a3a948d0de50f3b1/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 #3242
Closes #3761
|
|
Fixes #3844
|
|
With help from
https://github.com/include-what-you-use/include-what-you-use/
|
|
Not enabling in .clang-format because it breaks headers files.
Used:
IncludeCategories:
- Regex: '^<config'
Priority: 0
- Regex: '^".*"'
Priority: 1
- Regex: '^<(xcb|xkb|yajl|X11)'
Priority: 3
- Regex: '.*'
Priority: 2
|
|
This is similar to #3820 but does not use qsort but an insertion sort in
con_attach.
Since each bar block automatically gets its own incremental bar id,
bards end up being sorted according to their definition order in the
config file.
For i3bar, the WM_CLASS is modified to include an instance name which
depends on the bar_id. This could be useful for other reason, e.g. users
targeting a specific bar instance.
Fixes #3491
|
|
|
|
Fix SEGFAULT when i3bar receives invalid input
|
|
Fixes #3844
|
|
Mentioned in #3242
|
|
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
https://github.com/i3/i3/blob/6e24e2ad6f4b1e32cfa27805a3a948d0de50f3b1/i3bar/src/xcb.c#L685
2. Xrandr change, `reconfig_windows()` is called and `output->visible` is
set to `true` in this line:
https://github.com/i3/i3/blob/6e24e2ad6f4b1e32cfa27805a3a948d0de50f3b1/i3bar/src/xcb.c#L1791
3. When the window's fullscreen is disabled,
`handle_visibility_notify()` returns in this line:
https://github.com/i3/i3/blob/6e24e2ad6f4b1e32cfa27805a3a948d0de50f3b1/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 #3242
Closes #3761
|
|
Behaviour was changed in f691a55923850a4d315450925fc98733d07b69c9
|
|
According to libxcb-cursor code, the only condition in which
xcb_cursor_context_new() returns a non-zero result is a memory
allocation failure[1]. Thus, it is safe to assume that
xcursor_supported is always true, and remove dead code.
[1]: https://gitlab.freedesktop.org/xorg/lib/libxcb-cursor/blob/0.1.3/cursor/cursor.c#L131-132
|
|
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 4211274fcd028a8e33a084e5695290ae0e9f3020
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>
|
|
See #3914
|
|
|
|
|
|
If -s is used, the socket_path returned by getenv is never freed.
Also some small rearrangements.
|
|
|
|
Fixes #3573
|
|
Saves some code repetition
|
|
|
|
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
|