Ingo Bürk [Wed, 11 May 2016 18:11:35 +0000 (20:11 +0200)]
Don't trigger binding on window border click unless --border is given. (#2349)
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.
Smart option added to hide_edge_borders config param (#2191) (#2191)
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
Ingo Bürk [Sun, 8 May 2016 10:55:27 +0000 (12:55 +0200)]
Introduce support for specifying variables from X resources. (#2286)
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.
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.
Ingo Bürk [Thu, 5 May 2016 18:46:33 +0000 (20:46 +0200)]
Use the last known timestamp when calling xcb_set_input_focus(). (#2332)
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.
Ingo Bürk [Thu, 5 May 2016 12:18:04 +0000 (14:18 +0200)]
Remove dead code guarded with "#if 0 … #endif" (#2338)
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.
Ingo Bürk [Sun, 1 May 2016 16:59:50 +0000 (18:59 +0200)]
Remove title indentation in nested containers. (#2330)
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.
i3-input: Proper position in non-standard cases. (#2313)
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.
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.
Correctly count the number of windows for no_focus. (#2296)
Previously we counted the number of (direct) children of the workspace to
decide whether no_focus should be applied or not. However, this doesn't
work correctly if there's a single container with multiple windows on the
workspace.
This patch correctly counts all windows on the workspace.
Only grab the mouse buttons that need to be grabbed. (#2290)
This is a followup to #2049. While we had fixed that bug by only grabbing
buttons 4 and 5 if there is a whole-window binding for that button, this
did not consider buttons higher than 5 as found on many mice.
Therefore, we now ditch the special handling for scrollwheel buttons and
instead do the same for all buttons higher than 3.
The resulting packages are pushed to Debian repositories hosted on
bintray.com.
This is the first step to move away from our custom buildbot setup (see
https://i3wm.org/docs/buildbot.html for details on that) towards
infrastructure which is more standard (travis) and in the open.
Make fullscreen windows open on the output which is indicated by their geometry
With this change, multi-monitor presentations (e.g. as implemented by
LibreOffice Impress) work out of the box. Previously, one had to move
the presentation windows to the right outputs oneself.
This ensures the repository is up-to-date (in all branches!), hopefully
preventing merge mistakes such as the one fixed with
https://github.com/i3/i3/commit/0e29101ae5f3753626ba447b83a9b8bd490de37e
Ingo Bürk [Thu, 25 Feb 2016 18:28:48 +0000 (19:28 +0100)]
Revert to default binding mode before reloading the config.
If a user reloads the config while in some binding mode, the binding mode
will revert to the default, but no event will ever be fired, causing a
broken i3bar mode display.
This patch explicitly reverts to the default binding mode before reloading
the config. We reload rather than switch to the binding mode after having
reloaded the config because there's no guarantee that mode will even still
exist.
Ingo Bürk [Thu, 25 Feb 2016 18:12:09 +0000 (19:12 +0100)]
Determine focused workspace correctly when moving workspace to output.
This patch correctly determines the previously focused workspace on the
target output when moving a workspace to another output. Before, we used
nodes_head for this, which will not actually return the previously focused
workspace, but just the first workspace on that output. Hence, we now use
focus_head instead.
This bug was introduced all the way back in 1e143fea when the feature of
moving workspaces to another output was first implemented.
split atoms.xmacro into 2 files to obtain _NET_SUPPORTED count
Manually updating a magic number doesn’t work in the long run.
With this change, the number of atoms contained in
include/atoms_NET_SUPPORTED.xmacro is used.
Ingo Bürk [Sun, 21 Feb 2016 13:26:13 +0000 (14:26 +0100)]
Document tray initialization better.
This commit removes an unnecessary fallback to the first output's name as
this name ("first") will only be used to see whether "tray_output none"
has been specified, anyway.
We also add documentation that clearly states when we want to initialize
the tray and when we don't want to do the same.
Ingo Bürk [Sun, 21 Feb 2016 13:13:58 +0000 (14:13 +0100)]
Remove unreachable fallback code for tray_output primary.
This commit removes the code for falling back to the first available
output for the system tray if 'tray_output primary' has been specified
but there is no primary output (managed by this bar).
This fallback behavior was broken/unreachable because the tray
will never be initialized in this situation in the first place. Having
this dead code lead to a wrong assumption in #1855 and hence to
commit e2e7b70d002cac2031cb65d6f5f197c9583913d6, which makes the
system tray not show up for many users when first installing i3.
This is a mix of what our old new-ticket-form used to suggest:
http://code.stapelberg.de/git/i3-new-ticket/tree/templates/index.html
…and what CONTRIBUTING.md already entailed.
See https://github.com/blog/2111-issue-and-pull-request-templates
Ingo Bürk [Thu, 11 Feb 2016 19:54:02 +0000 (20:54 +0100)]
Don't allow floating workspaces anymore.
This is essentially a revert of daf00a9 which introduced a mechanism
to float workspace containers by wrapping all children into a new
container and floating it.
This caused a bug and there's no good reason (anymore) to allow doing
this in the first place as we don't support floating nested containers.
Ingo Bürk [Thu, 11 Feb 2016 18:57:32 +0000 (19:57 +0100)]
Allow "modifier none" in i3bar to disable the modifier.
This allows "modifier none" (and "modifier off") for the bar config
in order to disable the modifier key altogether. This is useful
for users who use a different approach to hiding / showing the bar,
e.g., a custom keybind that involved multiple keys or scripts.
Ingo Bürk [Tue, 9 Feb 2016 20:03:44 +0000 (21:03 +0100)]
Ensure that the "border" command uses logical pixels.
Until now, only the config directive for borders (new_window,
new_float) respected the DPI setting (using logical_px). This
patch makes sure we also do so for runtime "border" commands.
travis: check spelling of binaries and manpages, use docker
We now build a docker base container based on debian sid (where the very
latest packages are available). That base container is updated once a
month, or whenever travis-build.Dockerfile or debian/control change, but
re-used for subsequent travis runs. While the initial build might take
up to 15 minutes, subsequent builds typically run in a minute or two.
All the different steps that we run on travis are now factored into
separate scripts in the travis/ directory.
Switching to docker should also help with issue #2174.