Previously, we always discarded the NumLock bit when looking up key
bindings for key press events, and we always grabbed every keycode with
and without the NumLock modifier.
With this commit, the NumLock bit is no longer discarded: since the
previous commit 3bd5e6e5c8 we can
correctly look up key bindings with/without the NumLock bit, as both
variants are stored in |keycodes_head|.
Further, before adding the NumLock fallback (resulting in grabbing the
keycode with the NumLock modifier), we now check whether the key has the
same meaning when NumLock is enabled. This correctly distinguishes the
KP_End vs. KP_1 case, i.e. one can now use the following key bindings:
# No longer accidentally triggered when pressing KP_1.
bindsym KP_End nop KP_End
# Properly distinguished now:
bindsym KP_End nop KP_End
bindsym Mod2+KP_1 nop KP_1
fixes#2346
since OpenBSD pthread does not support pthread_condattr_setpshared().
This patch could also stay in the OpenBSD ports tree or depend on a
configure test macro rather than defined __OpenBSD__.
Prior to this commit a binding specifying only --whole-window would
trigger even when clicking on the window border. However, this should
only happen if --border is specified.
fixes#2348
Use case:
* When managing multiple terminals in a workspace, the borders makes it easier
to know where the focus is, but when there is only one it's obvious where the
focus is.
* When there's only a web browser for example, the borders are actually counter-
productive since it makes clicking a side scrollbar or a tab a bit harder (if I
smash my cursor to the side or the top of the workspace, I have to move it in
the other direction by just a few pixels to be able to grab it)
Behaviour:
* No borders when there's a single window in a workspace
* Borders when there are multiple windows in a workspace
fixes#2188
This patch introduces a new 'set_from_resource' config directive which
allows defining a variable by retrieving its value from the X resource
database. This avoids having to configure a color scheme in multiple
files. The directive takes an additional fallback value which is used
in case the resource cannot be found or during config validation where
no X connection is available.
Furthermore, this patch includes the following changes:
- If the same variable is defined twice, we now properly overwrite the
value of the assignment rather than inserting two variable definitions
with the same key.
- We now depend on xcb-util-xrm to query the resource.
- Increase the buffer size for variable / resource assignments.
fixes#2130
If an output is disabled during a restart, for example because a binding
such as
bindsym $mod+Shift+r exec "xrandr --auto", restart
is used, it can happen that we first write the layout to disk and only
then receive the RandR change events. This leads to a situation where
the restored tree will contain these outputs, but the restarted i3
process will not receive the RandR events, thus the internal output in i3
is marked disabled.
This patch finds these cases after a restart and force-disables the
affected outputs.
fixes#2326
In most cases this won't make a difference, but consider the following
scenario:
* Some application acquires input focus on its own (which the window manager
is not involved in, so it will "always" work).
* Before the FocusIn / FocusOut events are processed by i3, the
workflow to push X changes is run, resulting in xcb_set_input_focus()
being called.
Using XCB_CURRENT_TIME, this means i3 will "win" and override the focus,
even though it simply wasn't aware (yet) that focus had already been taken
over by someone else. When processing the FocusIn / FocusOut events, i3
assumes that the focus is already set which results in a broken focus
state as i3 assumes some container has the input focus when it doesn't.
With the new behavior, i3's attempt to set the input focus will fail if
the FocusIn / FocusOut events have not yet processed. Once they are processed,
the focus state will be automatically corrected.
fixes#2322
This code has been neutralized for many years now and served no purpose
other than cluttering up the code. We obviously don't need it and it's
out of date anyway.
If there's ever any reason to restore (parts of) it, we have git for
that. But we don't need to keep commented out code around.
This commit removes the title indentation in certain nested container
situations. The behavior was considered broken as it didn't seem to
make sense and it was unclear why this was introduced.
Given that nobody on i3-discuss@ complained about removing this logic
within two weeks, we are now removing it to make the title rendering
code a little less complex.
fixes#2247
This commit fixes two issues:
* We detect the EWMH support window from the root window. If this window
currently has the input focus, we ignore this. We do this because this
window is not a window the user is aware of and positioning relative to
it makes no sense.
* We also detect whether the current input focus is in an i3-frame window.
This can happen, e.g., when selecting a parent (split) container. Since
frame windows are direct children of the root window, we must not
translate its coordinates or we get weird results and i3-input ends up
off-screen (see #2312). For all other windows, including those without
any WM_CLASS, we proceed as before.
fixes#2312
When allowing multiple marks on a container, we renamed the "mark"
field to "marks". This breaks i3-save-tree which will now filter out
the marks on a window because it doesn't match anymore. This commit
fixes that issue.
Thanks to /u/xenomachina for hinting to this issue.
Since we don't actually stop drawing a title (or marks) with the
distance of the border width on the right side, but instead with
a hard-coded two pixel distance, we can only redraw that much of
the border without potentiall cutting off text.
relates to #2247
Use `uintptr_t` to cast the con id to int instead of `long int`. This
type is guaranteed to hold the pointer as an int regardless of platform.
fixes#2283