Before this commit, placeholder windows had any matches that were
defined in the JSON file, _followed_ by an i3-internal match that
ensures the placeholder X11 window gets swallowed into the placeholder
i3 container.
The problem was that the first successful match was deleted, and if
users specified a criterion (title=IPython) that matched the placeholder
window itself (name=IPython), then that match is deleted and the
i3-internal match is kept. This results in the actual window the user
wants to match not being swallowed, and the placeholder window not
displaying any criteria.
Michael Tipton [Tue, 3 Mar 2015 07:44:28 +0000 (23:44 -0800)]
Fix scrolling in window decoration with hidden cursor.
If the mouse cursor is hidden (by unclutter, for example), then scrolling
in the window decoration creates an event with a child
(i.e. event->child != XCB_NONE). This causes route_click() to be called
with dest=CLICK_INSIDE, which prevents scrolling through a stacked layout.
To fix this, check if a click is in the window decoration _before_
checking if the event has a child.
Steven McDonald [Sun, 1 Mar 2015 07:30:45 +0000 (18:30 +1100)]
Fix key bindings on big-endian platforms
input_code is a uint16_t, but xcb_keycode_t is uint8_t, meaning that
only the first byte of input_code is inspected by memmem. On
little-endian platforms, this code would have worked by accident, since
the first byte of input_code represents the 8 least significant bits.
However, on big-endian platforms the first byte is the 8 most
significant bits, which means memmem is scanning bind->translated_to
for the wrong keycode (probably 0).
In order to work correctly on big-endian and little-endian platforms,
simply typecast input_code to an xcb_keycode_t and pass that to memmem.
The observed behaviour associated with this bug is that key bindings
don't work at all. This patch has been tested on an iBook G4 running
OpenBSD -current, and key bindings work properly with this fix applied.
When using Pango to draw text in i3bar, the y-offset of the text is
incorrectly calculated in case all characters in the string to draw are
smaller than the cached font height. Fixes #1494.
Tony Crisci [Sat, 21 Feb 2015 22:34:26 +0000 (17:34 -0500)]
Config: use default system monospace
Use the default monospace font for the system in the default config.
This should be a bit more portable for systems that do not have the
recommended font installed.
Ingo Bürk [Wed, 18 Feb 2015 19:11:42 +0000 (20:11 +0100)]
Introduce a statusline buffer.
A buffer is introduced for the statusline which will only be copied to the actual statusline
once an entire statusline is parsed. This avoids a race condition where incompletely parsed
statuslines were rendered, causing only some status blocks to be rendered which is visible to
the user as a flickering.
Tony Crisci [Thu, 12 Feb 2015 19:45:34 +0000 (14:45 -0500)]
i3bar: use Pango markup
Parse text within workspace buttons and the i3bar statusline as Pango
markup. This lets people specify things like font weight, text color,
background color, font size, and font family in the text of i3bar.
Ingo Bürk [Wed, 11 Feb 2015 19:34:43 +0000 (20:34 +0100)]
Make click events on status blocks work if 'workspace_buttons no' is set.
1. Always subscribe to click events for i3bar.
2. Exit the click event handler if no current workspace was found only after clicks on status blocks have been handled.
Lukas K [Tue, 27 Jan 2015 21:58:48 +0000 (22:58 +0100)]
Support _NET_WM_MOVERESIZE
Add support for the _NET_WM_MOVERESIZE client message. This message
enables clients to initiate window moving or resizing. Toolkits like
Gtk3 use this message when the user drags a client-side decorated window
by its title bar. When Gtk detects that the window manager does not
support this client message, it uses a slow fallback implementation.
Tony Crisci [Tue, 10 Feb 2015 19:26:22 +0000 (14:26 -0500)]
Update bar font config on reload
Dynamically update the font when the `reload` command is called by
reloading the font with `xcb_init_late` and adjusting the size of the
bar by updating the output dimensions with a call to the ipc.