]> git.sur5r.net Git - i3/i3/log
i3/i3
9 years agoSuppress no_focus for first window on a workspace.
Ingo Bürk [Mon, 12 Oct 2015 10:56:19 +0000 (12:56 +0200)]
Suppress no_focus for first window on a workspace.

With this patch, the no_focus directive will be ignored if the
to-be-opened window is the first on its workspace as there's no
reason the user would not want to focus it in this case.
This improves usability when, for example, using a tabbed
workspace_layout.

fixes #1987

9 years agoUse sasprintf()
Michael Stapelberg [Sun, 11 Oct 2015 18:42:52 +0000 (20:42 +0200)]
Use sasprintf()

9 years agoBugfix: add keymap fall back (_XKB_RULES_NAMES, then defaults)
Michael Stapelberg [Sun, 11 Oct 2015 18:23:07 +0000 (20:23 +0200)]
Bugfix: add keymap fall back (_XKB_RULES_NAMES, then defaults)

fixes #1983

9 years agoMerge pull request #1974 from sur5r/master
Michael Stapelberg [Fri, 2 Oct 2015 17:52:10 +0000 (19:52 +0200)]
Merge pull request #1974 from sur5r/master

Fix formatting of description list

9 years agoFix formatting of description list 1974/head github/master
Jakob Haufe [Thu, 1 Oct 2015 19:34:16 +0000 (21:34 +0200)]
Fix formatting of description list

9 years agoUpdate debian/changelog
Michael Stapelberg [Wed, 30 Sep 2015 06:55:24 +0000 (08:55 +0200)]
Update debian/changelog

9 years agoMerge branch 'next' into master
Michael Stapelberg [Wed, 30 Sep 2015 06:55:24 +0000 (08:55 +0200)]
Merge branch 'next' into master

9 years agoMerge branch 'release-4.11'
Michael Stapelberg [Wed, 30 Sep 2015 06:55:24 +0000 (08:55 +0200)]
Merge branch 'release-4.11'

9 years agorelease i3 4.11 4.11
Michael Stapelberg [Wed, 30 Sep 2015 06:55:07 +0000 (08:55 +0200)]
release i3 4.11

9 years agoMerge pull request #1967 from Airblader/feature-easier-command-diff
Michael Stapelberg [Mon, 28 Sep 2015 06:25:58 +0000 (08:25 +0200)]
Merge pull request #1967 from Airblader/feature-easier-command-diff

Break list of commands in parser test

9 years agoMerge pull request #1962 from Airblader/bug-move-to-output-criteria
Michael Stapelberg [Mon, 28 Sep 2015 06:22:09 +0000 (08:22 +0200)]
Merge pull request #1962 from Airblader/bug-move-to-output-criteria

Correctly handle command criteria for "move window to output".

9 years agoMerge pull request #1961 from Airblader/bug-1957
Michael Stapelberg [Mon, 28 Sep 2015 06:19:23 +0000 (08:19 +0200)]
Merge pull request #1961 from Airblader/bug-1957

Avoid freeze when moving container

9 years agoMerge pull request #1960 from Airblader/bug-restore-mark
Michael Stapelberg [Mon, 28 Sep 2015 06:19:04 +0000 (08:19 +0200)]
Merge pull request #1960 from Airblader/bug-restore-mark

Fix duplicated marks on append_layout

9 years agoBreak list of all commands into one line per command. This reduces the chances of... 1967/head
Ingo Bürk [Sun, 27 Sep 2015 17:25:17 +0000 (19:25 +0200)]
Break list of all commands into one line per command. This reduces the chances of merge conflicts when
introducing or removing commands and therefore increases maintainability (albeit by only a little).

9 years agoCorrectly handle command criteria for "move window to output". 1962/head
Ingo Bürk [Sat, 26 Sep 2015 19:31:28 +0000 (21:31 +0200)]
Correctly handle command criteria for "move window to output".

9 years agoWhen moving a container to a mark, also check whether the container is being moved... 1961/head
Ingo Bürk [Fri, 25 Sep 2015 17:43:43 +0000 (19:43 +0200)]
When moving a container to a mark, also check whether the container is being moved to its own descendant and
reject the request if this is the case.

fixes #1957

9 years agoWhen appending a layout containing a marked container, make sure that any other conta... 1960/head
Ingo Bürk [Fri, 25 Sep 2015 17:17:46 +0000 (19:17 +0200)]
When appending a layout containing a marked container, make sure that any other containers with the same mark
are unmarked during insertion of the new container.

fixes #1956

9 years agoMerge pull request #1931 from Airblader/bug-1924
Michael Stapelberg [Thu, 24 Sep 2015 20:34:29 +0000 (22:34 +0200)]
Merge pull request #1931 from Airblader/bug-1924

Improvements for sticky windows

9 years agoKeep a sticky window focused if it was the focused window on the source workspace. 1931/head
Ingo Bürk [Thu, 17 Sep 2015 20:52:56 +0000 (22:52 +0200)]
Keep a sticky window focused if it was the focused window on the source workspace.

fixes #1924

9 years agoMerge pull request #1952 from hwangcc23/fix-1875
Michael Stapelberg [Thu, 24 Sep 2015 11:23:07 +0000 (13:23 +0200)]
Merge pull request #1952 from hwangcc23/fix-1875

Not toggle floating on a CT_FLOATING_CON

9 years agoNot toggle floating on a CT_FLOATING_CON 1952/head
hwangcc23 [Tue, 22 Sep 2015 15:04:10 +0000 (23:04 +0800)]
Not toggle floating on a CT_FLOATING_CON

See the issue #1875.
Forbid the command to toggle floating on a CT_FLOATING_CON to avoid the crash.

9 years agoMerge pull request #1945 from Airblader/feature-frame-class
Michael Stapelberg [Tue, 22 Sep 2015 07:10:38 +0000 (09:10 +0200)]
Merge pull request #1945 from Airblader/feature-frame-class

Set a proper WM_CLASS on frame windows.

9 years agoSet a proper WM_CLASS on frame windows. 1945/head
Ingo Bürk [Mon, 21 Sep 2015 22:01:36 +0000 (00:01 +0200)]
Set a proper WM_CLASS on frame windows.

9 years agoMerge pull request #1944 from tcatm/fix-vlog
Michael Stapelberg [Mon, 21 Sep 2015 12:48:30 +0000 (14:48 +0200)]
Merge pull request #1944 from tcatm/fix-vlog

log: avoid buffer overflow in vlog

9 years agolog: avoid buffer overflow in vlog 1944/head
Nils Schneider [Mon, 21 Sep 2015 12:27:22 +0000 (14:27 +0200)]
log: avoid buffer overflow in vlog

`vlog()` can not handle log messages longer than 4096 bytes. However, the
message generated in `store_restart_layout()` is likely to exceed this
as it contains a long JSON string.

This has caused a few SEGFAULTS during restarts for me when running with
`-d all`.

Fix this by truncating the message to 4096 bytes and punching in a newline at
the end.

9 years agoMerge pull request #1943 from tcatm/fix-no-randr-output
Michael Stapelberg [Mon, 21 Sep 2015 11:56:43 +0000 (13:56 +0200)]
Merge pull request #1943 from tcatm/fix-no-randr-output

Don't create empty workspaces on restart

9 years agoDon't create empty workspaces on restart 1943/head
Nils Schneider [Mon, 21 Sep 2015 09:44:39 +0000 (11:44 +0200)]
Don't create empty workspaces on restart

This fixes a bug I introduced in #1921. When restarting i3 in place a
stray workspace was created on the root_output during restart. On first
start, this workspace would have been moved to the first real and empty
output.

However, this does not produce the desired result during restarts when
workspaces are alread present on all real outputs. The stray workspace would
still be added to the first real output which already contains some
workspaces. Thus, adding a new empty workspace to it.

Fix this by delaying creation of the root output's workspace until it is
known whether the output is active or not.

Fixes #1940

9 years agoMerge pull request #1937 from Airblader/bug-1910
Michael Stapelberg [Mon, 21 Sep 2015 08:18:25 +0000 (10:18 +0200)]
Merge pull request #1937 from Airblader/bug-1910

Correctly restore floating windows

9 years agoMerge pull request #1921 from tcatm/fix-no-randr-output
Michael Stapelberg [Mon, 21 Sep 2015 08:17:21 +0000 (10:17 +0200)]
Merge pull request #1921 from tcatm/fix-no-randr-output

randr: use root window in case of no randr outputs

9 years agoMerge branch 'hwangcc23-debuglog-on-persist' into next
Michael Stapelberg [Mon, 21 Sep 2015 08:10:45 +0000 (10:10 +0200)]
Merge branch 'hwangcc23-debuglog-on-persist' into next

fixes #1929

9 years agoMerge branch 'debuglog-on-persist' of git://github.com/hwangcc23/i3 into hwangcc23...
Michael Stapelberg [Mon, 21 Sep 2015 08:05:14 +0000 (10:05 +0200)]
Merge branch 'debuglog-on-persist' of git://github.com/hwangcc23/i3 into hwangcc23-debuglog-on-persist

9 years agoIf no output is available, use the root screen geometry to determine the maximum... 1937/head
Ingo Bürk [Sun, 20 Sep 2015 09:35:26 +0000 (11:35 +0200)]
If no output is available, use the root screen geometry to determine the maximum size when checking the size of floating windows.
This is necessary during a restart of i3 when restoring floating windows. In this situation, we restore the layout before setting up the RandR outputs which would set the window's size to 0, making it invisible.

Thanks to hwangcc23 and spudowiar for reporting.

fixes #1910
fixes #1934

9 years agoMake “debuglog on” command persist via restarts 1930/head
hwangcc23 [Thu, 17 Sep 2015 15:53:12 +0000 (23:53 +0800)]
Make “debuglog on” command persist via restarts

1. Reference: issue #1929
2. When restarting, add the argument "-d all" if debuglog is on.
3. Add add_argument() for adding/replacing the given argument.

9 years agorandr: use root window in case of no randr outputs 1921/head
Nils Schneider [Mon, 14 Sep 2015 20:12:47 +0000 (22:12 +0200)]
randr: use root window in case of no randr outputs

This patch introduces a root output covering the root window. It is used
in two cases:

1. RandR is not available. In this case, the previous behaviour of
   creating a single output covering the root window is preserved.

2. RandR is available, but there is no active output. In this case,
   the root output is enabled and will be the only active output.
   If any RandR output becomes available, the root output will be
   disabled again. Existing mechanisms for migrating workspaces will
   just work without modification.

I've carefully slipped in a global variable `Output root_output` representing
that output.

Fixes #926 and #1489

9 years agoBugfix: load new keymap _before_ translating keysyms (Thanks Airblader)
Michael Stapelberg [Thu, 17 Sep 2015 20:34:59 +0000 (22:34 +0200)]
Bugfix: load new keymap _before_ translating keysyms (Thanks Airblader)

fixes #1919

9 years agoMerge pull request #1920 from Airblader/feature-1873
Michael Stapelberg [Thu, 17 Sep 2015 08:08:27 +0000 (10:08 +0200)]
Merge pull request #1920 from Airblader/feature-1873

Set and unset individual atoms in _NET_WM_STATE

9 years agoSet and unset individual atoms in _NET_WM_STATE instead of overwriting the entire... 1920/head
Ingo Bürk [Mon, 14 Sep 2015 11:34:15 +0000 (13:34 +0200)]
Set and unset individual atoms in _NET_WM_STATE instead of overwriting the entire list everytime. This allows independent management of multiple states.

fixes #1873

9 years agoMerge pull request #1928 from Airblader/bug-1927
Michael Stapelberg [Wed, 16 Sep 2015 17:58:21 +0000 (19:58 +0200)]
Merge pull request #1928 from Airblader/bug-1927

Fix mode_toggle for sticky windows

9 years agoUse the focused container to determine the target window_mode when using floating... 1928/head
Ingo Bürk [Wed, 16 Sep 2015 17:51:09 +0000 (19:51 +0200)]
Use the focused container to determine the target window_mode when using floating mode_toggle.
This fixes mode_toggle in case the workspace is focused and only a floating sticky window is open.

fixes #1927

9 years agoRevert "Add a timeout: delay_exit_on_zero_displays"
Nils Schneider [Mon, 14 Sep 2015 20:34:05 +0000 (22:34 +0200)]
Revert "Add a timeout: delay_exit_on_zero_displays"

This reverts commit 2c77d7ceed298caf17a78b382e23af2e48377021.

9 years agoclang-format
Michael Stapelberg [Mon, 14 Sep 2015 08:22:43 +0000 (10:22 +0200)]
clang-format

(When will I learn? I need to integrate clang-format into my editor.)

9 years agoExtract workspace names from bindings before reordering.
Michael Stapelberg [Mon, 14 Sep 2015 07:28:42 +0000 (09:28 +0200)]
Extract workspace names from bindings before reordering.

fixes #1889

9 years agoMerge pull request #1856 from Airblader/feature-1455
Michael Stapelberg [Sun, 13 Sep 2015 20:47:14 +0000 (13:47 -0700)]
Merge pull request #1856 from Airblader/feature-1455

EWMH Sticky windows

9 years agoMake sure sticky windows pop to the front if they get sticky while not being on a... 1856/head
Ingo Bürk [Wed, 26 Aug 2015 19:06:53 +0000 (21:06 +0200)]
Make sure sticky windows pop to the front if they get sticky while not being on a visible workspace.
This commit also reworks the way focusing sticky windows is prevented by not focusing them temporarily at all, but preventing the focus in the first place.

9 years agoAdded tests for sticky windows.
Ingo Bürk [Sun, 23 Aug 2015 20:19:20 +0000 (22:19 +0200)]
Added tests for sticky windows.

9 years agoImplement new 'sticky' command to manually set, remove or toggle the sticky state...
Ingo Bürk [Sat, 22 Aug 2015 21:37:41 +0000 (23:37 +0200)]
Implement new 'sticky' command to manually set, remove or toggle the sticky state on a window.

9 years agoHandle _NET_WM_STATE_STICKY, but only for floating containers. If this atom is set...
Ingo Bürk [Sun, 23 Aug 2015 11:36:12 +0000 (13:36 +0200)]
Handle _NET_WM_STATE_STICKY, but only for floating containers. If this atom is set, the floating window will always be automatically moved to the currently active workspace of the output that it is on. This is the equivalent of a sticky note stuck to the monitor.
We will respect this atom upon managing a window as well as when we receive a request that changes the sticky state.

fixes #1455

9 years agoMerge pull request #1917 from Airblader/feature-1378
Michael Stapelberg [Sun, 13 Sep 2015 18:33:33 +0000 (11:33 -0700)]
Merge pull request #1917 from Airblader/feature-1378

Use EWMH window as focus fallback

9 years agoUse the EWMH support window rather than the root window as an input focus fallback. 1917/head
Ingo Bürk [Sat, 12 Sep 2015 20:34:06 +0000 (22:34 +0200)]
Use the EWMH support window rather than the root window as an input focus fallback.

If no other window is available on the active workspace, we now select the EWMH support window (used to indicate that an EWMH-compliant window manager is preent) as the focus window rather than the root window. The NET_WM_ACTIVE window will still be set to XCB_WINDOW_NONE to pretend that no window is actually focused.
This fixes the issue that when using the root window, a fallback mechanism in X11 takes effect which routes keyboard input to the window under the cursor, independent of whether that window has the input focus. Using the EWMH window instead, we can avoid this behavior. We cannot simply set it to XCB_WINDOW_NONE as this would discard all keyboard events, breaking keybindings.

fixes #1378

9 years agoMerge pull request #1893 from rr-/resize
Michael Stapelberg [Fri, 11 Sep 2015 21:31:33 +0000 (14:31 -0700)]
Merge pull request #1893 from rr-/resize

Added cmd_size

9 years agoSupport "resize set W H" 1893/head
rr- [Sat, 5 Sep 2015 06:31:45 +0000 (08:31 +0200)]
Support "resize set W H"

9 years agodocs/debugging: warn more clearly about sensitive info (Thanks lambithal)
Michael Stapelberg [Fri, 11 Sep 2015 18:17:53 +0000 (20:17 +0200)]
docs/debugging: warn more clearly about sensitive info (Thanks lambithal)

closes #1906, see #1907 for discussion

9 years agoMerge pull request #1913 from Airblader/feature-1809
Michael Stapelberg [Fri, 11 Sep 2015 07:47:28 +0000 (00:47 -0700)]
Merge pull request #1913 from Airblader/feature-1809

Let "focus" report success depending on whether a window was matched.

9 years agoMerge pull request #1912 from lasers/patch-1
Michael Stapelberg [Fri, 11 Sep 2015 07:30:35 +0000 (00:30 -0700)]
Merge pull request #1912 from lasers/patch-1

 Fix typo in userguide

9 years agoLet "focus" report success depending on whether a window was matched. 1913/head
Ingo Bürk [Fri, 11 Sep 2015 06:26:33 +0000 (08:26 +0200)]
Let "focus" report success depending on whether a window was matched.

fixes #1809

9 years ago Fix typo in userguide 1912/head
lasers [Fri, 11 Sep 2015 03:42:00 +0000 (22:42 -0500)]
 Fix typo in userguide

9 years agoupdate release.sh for 4.10.4 release
Michael Stapelberg [Tue, 8 Sep 2015 07:27:59 +0000 (09:27 +0200)]
update release.sh for 4.10.4 release

9 years agodebian: update changelog
Michael Stapelberg [Tue, 8 Sep 2015 07:25:53 +0000 (09:25 +0200)]
debian: update changelog

9 years agoUpdate debian/changelog
Michael Stapelberg [Tue, 8 Sep 2015 07:19:33 +0000 (09:19 +0200)]
Update debian/changelog

9 years agoMerge branch 'master' into next
Michael Stapelberg [Tue, 8 Sep 2015 07:19:33 +0000 (09:19 +0200)]
Merge branch 'master' into next

9 years agoMerge branch 'release-4.10.4'
Michael Stapelberg [Tue, 8 Sep 2015 07:19:33 +0000 (09:19 +0200)]
Merge branch 'release-4.10.4'

9 years agorelease i3 4.10.4 4.10.4
Michael Stapelberg [Tue, 8 Sep 2015 07:19:17 +0000 (09:19 +0200)]
release i3 4.10.4

9 years agoRevert "Check if output is disabled in handle_output()"
Michael Stapelberg [Tue, 25 Aug 2015 18:09:56 +0000 (20:09 +0200)]
Revert "Check if output is disabled in handle_output()"

This reverts commit e71c304444dd3070877887d2bb5407cd64033946.

It turns out that several users have workflows in which they turn off
their monitors without using e.g. `xrandr --output DP-1 --off`. The
result is that the monitors are disconnected, but not disabled.

With commit e71c304444dd3070877887d2bb5407cd64033946, i3 started to see
these two states as one and the same state, but that causes more harm
than it does good. For example, for some users with only one monitor, i3
would just exit when these users turned off their monitor.

related to #1858, #1839

fixes #1845

9 years agoi3-msg: strdup getenv() result before freeing
shdown [Thu, 20 Aug 2015 19:55:23 +0000 (22:55 +0300)]
i3-msg: strdup getenv() result before freeing

Fixes #1852.

9 years agoMerge pull request #1895 from Airblader/bug-1883
Michael Stapelberg [Sun, 6 Sep 2015 11:26:53 +0000 (13:26 +0200)]
Merge pull request #1895 from Airblader/bug-1883

Support moving dock clients to another output.

9 years agoSupport moving dock clients to another output. 1895/head
Ingo Bürk [Sat, 5 Sep 2015 10:35:28 +0000 (12:35 +0200)]
Support moving dock clients to another output.

This fixes #1883 where a race condition between i3 and i3bar caused two i3bar clients to be put onto the same output.

9 years agoMerge pull request #1899 from Airblader/bug-swallowed-percent
Michael Stapelberg [Sat, 5 Sep 2015 18:14:05 +0000 (20:14 +0200)]
Merge pull request #1899 from Airblader/bug-swallowed-percent

Fix incorrect swallow of percent sign

9 years agoMerge pull request #1898 from Airblader/bug-1896
Michael Stapelberg [Sat, 5 Sep 2015 18:13:13 +0000 (20:13 +0200)]
Merge pull request #1898 from Airblader/bug-1896

Free the string returned by g_markup_escape_text.

9 years agoIf a title contains a percent sign, make sure it is not swallowed by parsing the... 1899/head
Ingo Bürk [Sat, 5 Sep 2015 14:29:47 +0000 (16:29 +0200)]
If a title contains a percent sign, make sure it is not swallowed by parsing the title_format (if one is set on the window).

9 years agoFree the string returned by g_markup_escape_text. 1898/head
Ingo Bürk [Sat, 5 Sep 2015 14:21:16 +0000 (16:21 +0200)]
Free the string returned by g_markup_escape_text.

fixes #1896

9 years agoFix “precisely 1 group” error message
Michael Stapelberg [Sat, 5 Sep 2015 12:32:58 +0000 (14:32 +0200)]
Fix “precisely 1 group” error message

fixes #1897

9 years agoMerge pull request #1891 from Airblader/bug-1890
Michael Stapelberg [Sat, 5 Sep 2015 10:54:47 +0000 (12:54 +0200)]
Merge pull request #1891 from Airblader/bug-1890

Handle absent window title

9 years agoMerge pull request #1892 from Airblader/bug-1215
Michael Stapelberg [Sat, 5 Sep 2015 10:46:47 +0000 (12:46 +0200)]
Merge pull request #1892 from Airblader/bug-1215

Fix rendering bug for floating windows

9 years agoMake sure borders are never counted as adjacent to the edge for floating containers. 1892/head
Ingo Bürk [Fri, 4 Sep 2015 23:44:37 +0000 (01:44 +0200)]
Make sure borders are never counted as adjacent to the edge for floating containers.

fixes #1215
relates to #998

9 years agoCorrectly handle an absent window title to avoid a crash for applications that only... 1891/head
Ingo Bürk [Fri, 4 Sep 2015 23:18:35 +0000 (01:18 +0200)]
Correctly handle an absent window title to avoid a crash for applications that only set it after opening the window.

fixes #1890

9 years agoMerge pull request #1880 from Airblader/feature-665
Michael Stapelberg [Thu, 3 Sep 2015 18:35:43 +0000 (20:35 +0200)]
Merge pull request #1880 from Airblader/feature-665

Move data from Con to Window

9 years agoMove aspect_ratio from Con to Window. 1880/head
Ingo Bürk [Sun, 30 Aug 2015 21:07:25 +0000 (23:07 +0200)]
Move aspect_ratio from Con to Window.

relates to #665

9 years agoMove width_increment and height_increment from Con to Window.
Ingo Bürk [Sun, 30 Aug 2015 21:04:20 +0000 (23:04 +0200)]
Move width_increment and height_increment from Con to Window.

relates to #665

9 years agoMerge pull request #1877 from Airblader/feature-1872
Michael Stapelberg [Mon, 31 Aug 2015 07:00:57 +0000 (09:00 +0200)]
Merge pull request #1877 from Airblader/feature-1872

Support _NET_WM_VISIBLE_NAME

9 years agoMove base_width and base_height from Con to Window
Ingo Bürk [Sun, 30 Aug 2015 20:48:37 +0000 (22:48 +0200)]
Move base_width and base_height from Con to Window

relates to #665

9 years agoSupport _NET_WM_VISIBLE_NAME. As per specification this is necessary since we can... 1877/head
Ingo Bürk [Sun, 30 Aug 2015 08:10:37 +0000 (10:10 +0200)]
Support _NET_WM_VISIBLE_NAME. As per specification this is necessary since we can display custom titles with title_format.

fixes #1872

9 years agoMerge pull request #1871 from Airblader/feature-1770
Michael Stapelberg [Sun, 30 Aug 2015 19:55:37 +0000 (21:55 +0200)]
Merge pull request #1871 from Airblader/feature-1770

Introduce command criterion value __focused__

9 years agoFix typo in userguide. 1871/head
Ingo Bürk [Sat, 29 Aug 2015 12:04:15 +0000 (14:04 +0200)]
Fix typo in userguide.

9 years agoAdded tests for special value __focused__.
Ingo Bürk [Fri, 28 Aug 2015 07:30:14 +0000 (09:30 +0200)]
Added tests for special value __focused__.

relates to #1770

9 years agoSupport a special value "__focused__" as a command criterion pattern for class, insta...
Ingo Bürk [Fri, 28 Aug 2015 06:26:27 +0000 (08:26 +0200)]
Support a special value "__focused__" as a command criterion pattern for class, instance, title, window_role and workspace.
This special value will match if the window's property equals that of the currently focused window.

relates to #1770

9 years agoBugfix: sort bindings, re-ordering once is not enough.
Michael Stapelberg [Fri, 28 Aug 2015 07:30:28 +0000 (09:30 +0200)]
Bugfix: sort bindings, re-ordering once is not enough.

Reordering once (as we did it before this commit) would only sort the
bindings by the _first_ bit of their event_state_mask, but we need to
sort them by _all_ bits of their event_state_mask.

fixes #1870

9 years agobindings: invert shift bit, don’t just remove it
Michael Stapelberg [Fri, 28 Aug 2015 07:09:31 +0000 (09:09 +0200)]
bindings: invert shift bit, don’t just remove it

Before this commit, we only made the transformation of C → c, with this
commit we’re considering both c → C and C → c.

fixes #1870

9 years agofix missing clang-format of amended commit
Michael Stapelberg [Wed, 26 Aug 2015 08:01:14 +0000 (10:01 +0200)]
fix missing clang-format of amended commit

9 years agoUse libxkbcommon for translating keysyms, support all XKB groups.
Michael Stapelberg [Sun, 23 Aug 2015 20:49:32 +0000 (22:49 +0200)]
Use libxkbcommon for translating keysyms, support all XKB groups.

fixes #1835

This commit improves the translation of keysyms to keycodes by loading
keymaps using libxkbcommon-x11 and using libxkbcommon for figuring out
the keymap, depending on each keybinding’s modifiers. This way, the
upper layers of complex layouts are now usable with i3’s bindsym
directive, such as de_neo’s layer 3 and higher.

Furthermore, the commit generalizes the handling of different XKB
groups. We formerly had support only for two separate groups, the
default group 1, and group 2. While Mode_switch is only one way to
switch to group 2, we called the binding option Mode_switch. With this
commit, the new names Group1, Group2 (an alias for Mode_switch), Group3
and Group4 are introduced for configuring bindings. This is only useful
for advanced keyboard layouts, such as people loading two keyboard
layouts and switching between them (us, ru seems to be a popular
combination).

When grabbing keys, one can only specify the modifier mask, but not an
XKB state mask (or value), so we still dynamically unbind and re-bind
keys whenever the XKB group changes.

The commit was manually tested using the following i3 config:

    bindsym Group4+n nop heya from group 4
    bindsym Group3+n nop heya from group 3
    bindsym Group2+n nop heya from group 2
    bindsym n nop heya
    bindsym shift+N nop explicit shift binding
    bindsym shift+r nop implicit shift binding
    bindcode Group2+38 nop fallback overwritten in group 2 only
    bindcode 38 nop fallback

…with the following layout:

    setxkbmap -layout "us,ua,ru,de" -variant ",winkeys,,neo" \
      -option "grp:shift_caps_toggle,grp_led:scroll" \
      -model pc104 -rules evdev

By default (xkb group 1, us layout), pressing “n” will result in the
“heya” message appearing. Pressing “a” will result in the “fallback”
message appearing. “j” is not triggered.

By pressing Shift+CapsLock you switch to the next group (xkb group 2, ua
layout). Pressing “a” will result in the “fallback overwritten in group
2 only” message, pressing “n” will still result in “heya”. “j” is not
triggered.

In the next group (xkb group 3, ru layout), pressing “a” will result in
the “fallback” message again, pressing “n” will result in “heya”,
“j” is not triggered.

In the last group (xkb group 4, de_neo layout), pressing “a” will still
result in “fallback”, pressing “n” will result in “heya”, pressing “j”
will result in “heya from group 4”.

Pressing shift+n results in “explicit shift binding”, pressing shift+r
results in “implicit shift binding”. This ensures that keysym
translation falls back to looking at non-shift keys (“r” can be used
instead of ”R”) and that the order of keybindings doesn’t play a role
(“bindsym n” does not override “bindsym shift+n”, even though it’s
specified earlier in the config).

The fallback behavior ensures use-cases such as ticket #1775 are still
covered.

Only binding keys when the X server is in the corresponding XKB group
ensures use-cases such as ticket #585 are still covered.

9 years agoRevert "Check if output is disabled in handle_output()"
Michael Stapelberg [Tue, 25 Aug 2015 18:09:56 +0000 (20:09 +0200)]
Revert "Check if output is disabled in handle_output()"

This reverts commit e71c304444dd3070877887d2bb5407cd64033946.

It turns out that several users have workflows in which they turn off
their monitors without using e.g. `xrandr --output DP-1 --off`. The
result is that the monitors are disconnected, but not disabled.

With commit e71c304444dd3070877887d2bb5407cd64033946, i3 started to see
these two states as one and the same state, but that causes more harm
than it does good. For example, for some users with only one monitor, i3
would just exit when these users turned off their monitor.

related to #1858, #1839

fixes #1845

9 years agoMerge pull request #1864 from Airblader/feature-1861-class-instance
Michael Stapelberg [Tue, 25 Aug 2015 17:29:17 +0000 (19:29 +0200)]
Merge pull request #1864 from Airblader/feature-1861-class-instance

Added '%class' and '%instance' as placeholders for the title_format

9 years agoAdded '%class' and '%instance' as placeholders for the title_format directive. 1864/head
Ingo Bürk [Tue, 25 Aug 2015 17:22:05 +0000 (19:22 +0200)]
Added '%class' and '%instance' as placeholders for the title_format directive.

relates to #1861

9 years agoMerge pull request #1863 from Airblader/feature-tray-output-config
Michael Stapelberg [Tue, 25 Aug 2015 17:09:37 +0000 (19:09 +0200)]
Merge pull request #1863 from Airblader/feature-tray-output-config

Add 'tray_output primary' to the default config

9 years agoAdd 'tray_output primary' to the default config 1863/head
Ingo Bürk [Tue, 25 Aug 2015 16:50:14 +0000 (18:50 +0200)]
Add 'tray_output primary' to the default config

9 years agodocs/userguide: document behavior of tray_output with multiple bars
Michael Stapelberg [Tue, 25 Aug 2015 07:23:41 +0000 (09:23 +0200)]
docs/userguide: document behavior of tray_output with multiple bars

fixes #1855

9 years agodocs/debugging: make it clearer that you need to reload i3
Michael Stapelberg [Mon, 24 Aug 2015 18:50:18 +0000 (20:50 +0200)]
docs/debugging: make it clearer that you need to reload i3

9 years agoMerge pull request #1853 from shdown/issue-1852
Michael Stapelberg [Thu, 20 Aug 2015 20:29:24 +0000 (22:29 +0200)]
Merge pull request #1853 from shdown/issue-1852

i3-msg: strdup getenv() result before freeing

9 years agoi3-msg: strdup getenv() result before freeing 1853/head
shdown [Thu, 20 Aug 2015 19:55:23 +0000 (22:55 +0300)]
i3-msg: strdup getenv() result before freeing

Fixes #1852.

9 years agoMerge pull request #1850 from Airblader/feature-docs-8
Michael Stapelberg [Tue, 18 Aug 2015 07:51:34 +0000 (09:51 +0200)]
Merge pull request #1850 from Airblader/feature-docs-8

[docs] Move client.background to the list of colorclasses

9 years agoAdd client.background to the list of all available colorclasses rather than mentionin... 1850/head
Ingo Bürk [Mon, 17 Aug 2015 21:55:31 +0000 (23:55 +0200)]
Add client.background to the list of all available colorclasses rather than mentioning it as something special afterwards.