Commit Graph

5341 Commits

Author SHA1 Message Date
Michael Stapelberg 55bc2ae6a9 i3-dump-log: explicitly free shmname
Reduces memory usage and makes LeakSanitizer more quiet.
2016-01-08 20:17:34 +01:00
Michael Stapelberg d155496915 root_atom_contents: properly clean up in all cases 2016-01-08 20:15:34 +01:00
Michael Stapelberg 54738f6ec8 bindings.h: mark DEFAULT_BINDING_MODE as external
This prevents the following linker warning (only when compiling with
-fsanitize=address):

/usr/bin/ld: Warning: size of symbol `DEFAULT_BINDING_MODE' changed
from 8 in src/resize.o to 64 in src/bindings.o
2016-01-08 19:56:32 +01:00
Michael Stapelberg 891bd6e3e5 Merge pull request #2150 from Airblader/bug-2149
Use correct fallback color for decoration_border.
2016-01-06 21:15:18 +01:00
Ingo Bürk bcee585e17 Use correct fallback color for decoration_border.
The newly introduced decoration_border color incorrectly uses the default value
for "background" as a fallback when not specified. Instead, it should use the
user-specified "background" as a fallback.

fixes #2149
2016-01-06 09:19:42 -05:00
Michael Stapelberg 8fce04b1e5 Merge pull request #2145 from Airblader/bug-2144
Fix segfault when calling "i3 -C".
2016-01-06 09:15:07 +01:00
Ingo Bürk b9b1a60b5d Fix segfault when calling "i3 -C".
Commit 287a0b4 introduced a segfault when validating the i3 config
as the root_screen will not be set in this case, causing a null
pointer dereference.

fixes #2144
2016-01-05 22:50:38 -05:00
Michael Stapelberg 3853d1866b Merge pull request #2143 from Airblader/feature-2120
Allow title_format for all containers
2016-01-05 22:32:15 +01:00
Michael Stapelberg c8d84af415 Merge pull request #2136 from lotheac/next
draw client borders in border color, not background
2016-01-05 22:24:53 +01:00
Ingo Bürk 1f660a4cc4 Move title_format from window to container.
This patch moves the title_format information from windows to containers.
Furthermore, it allows correctly setting it on window-less containers and
displays the title accordingly for split containers.

We now also dump and read title_format in GET_TREE / during restarts.

fixes #2120
2016-01-05 12:22:27 -05:00
Lauri Tirkkonen 034a12acad add decoration_border color for the actual client borders
see https://github.com/i3/i3/pull/2136
2016-01-05 12:17:48 +02:00
Michael Stapelberg cd172da6ae Merge pull request #2148 from Airblader/feature-2120-memleaks
Fix memory leaks in title_format.
2016-01-05 09:11:44 +01:00
Ingo Bürk 6fefe836d4 Fix memory leaks in title_format.
This fixes three memory leaks that were found during the implementation of #2120
so that they can be fixed in a bugfix release.

relates to #2143
2016-01-04 18:48:01 -05:00
Michael Stapelberg e70b2f9dcd Merge pull request #2139 from jolange/feature_split-toggle
added "toggle" option to "split" command
2016-01-04 19:34:09 +01:00
Johannes Lange 8bfd06c3dd added "toggle" option to "split" command
as requested in #1814
2016-01-04 17:31:47 +01:00
Michael Stapelberg a9f31b9dc9 i3-nagbar: explicitly set cursor using libxcursor if available
See commit b1f1da432 for context.

fixes #2114
2016-01-04 09:26:45 +01:00
Michael Stapelberg ebda8dc372 Merge pull request #2133 from Airblader/feature-2115
Added test for #2097.
2016-01-04 09:04:51 +01:00
Ingo Bürk 6130e8aed9 Migrate "xdotool click" in tests to XTEST. 2016-01-03 21:48:39 -05:00
Ingo Bürk c099381632 Added test for #2097.
fixes #2115
2016-01-03 21:43:33 -05:00
Michael Stapelberg 98875fda76 Merge pull request #2135 from Alexis211/colors
Correct color management for non-true color displays
2015-12-30 16:24:31 +01:00
Michael Stapelberg 981c64667c docs/ipc: add https://github.com/drmgc/i3ipcpp 2015-12-30 15:59:53 +01:00
Alex Auvolat 287a0b4c3c get_colorpixel support for non-true color displays
Re-introduce fully-fledged get_colorpixel function, which enables arbitrary
color depths for the display.  The previous code is kept as an optimization for
the case of a true color display, where a X11 roundtrip is unnecessary.
2015-12-29 14:26:21 +01:00
Alex Auvolat c6a4e4519f Correct color management for pango fonts
Corrects the cases where the colorpixel is not 0xRRGGBB : we have to
use the full color_t struct to describe font colors, as Pango expects
RGB values and not an XCB colorpixel value.
2015-12-29 14:26:21 +01:00
Michael Stapelberg 0ee9e65a3b Merge pull request #2138 from Alexis211/factor
Refactor extern definition of conn and root_screen
2015-12-29 13:51:15 +01:00
Alex Auvolat 19fd6817af Refactor extern definition of conn and root_screen 2015-12-29 12:47:12 +01:00
Michael Stapelberg f6021c957b Merge pull request #2137 from fmthoma/fix-assign-workspace
Comply with documentation: 'workspace' token in 'assign' command
2015-12-29 12:26:38 +01:00
Michael Stapelberg 29275598e5 Merge pull request #2131 from kneitinger/next
userguide: clarify quoting of exec commands
2015-12-29 12:18:57 +01:00
Michael Stapelberg bc126aaeaf Merge pull request #2134 from Airblader/bug-1761
Properly validate containers when killing via criteria
2015-12-29 11:50:58 +01:00
Michael Stapelberg fcb25f0232 Merge pull request #2132 from Airblader/bug-2128
Move urgent flag before killing the parent.
2015-12-29 11:44:19 +01:00
Franz Thoma 194da2d7cf Comply with documentation: 'workspace' token in 'assign' command
According to the User's Guide [1], an `assign` command allows a
`workspace` token after the selector, as an alternative or in addition
to the unicode arrow `→`. In reality, however, the `workspace` token is
not recognized.

Example:
  assign [class="Firefox"] workspace "1: Browser"
should assign Firefox windows to workspace `1: Browser`, but the the
browser window appears on a new workspace called
`workspace "1: Browser"` instead.

With this fix, both `→` and `workspace` are recognized (and ignored)
after the selector.

[1] https://i3wm.org/docs/userguide.html#_automatically_putting_clients_on_specific_workspaces
2015-12-28 20:11:25 +01:00
Ingo Bürk 19c273a2ad Validate matched containers for "kill" command correctly.
We now execute the validations when "kill" is executed even if match
criteria are used. This prevents users from killing workspace containers,
which instead kills all clients (as before when not using criteria).

fixes #1761
2015-12-28 02:35:25 -05:00
Ingo Bürk 0dd71674de Rename tree_close() to tree_close_internal().
It should be clear for callers of this function that this is an internal
function that skips certain validations which might be important. Therefore
we make it clear that this is an internal function by renaming it.

relates to #1761
2015-12-27 20:58:35 -05:00
Ingo Bürk 61a8bc81ec Move urgent flag before killing the parent.
We need to move the urgent flag when moving a container across
workspaces before calling on_remove_child on the parent in order
to avoid a crash.

fixes #2128
2015-12-27 18:08:30 -05:00
Kyle Kneitinger 3919dd8daa userguide: clarify quoting of exec commands 2015-12-27 12:07:41 -08:00
Michael Stapelberg dc463077d6 Merge pull request #2113 from Airblader/bug-2111
Match on all criteria even if con_id or con_mark are given.
2015-12-25 17:14:29 +01:00
Michael Stapelberg b1f1da432d i3bar: explicitly set cursor using libxcursor if available
Even if the X11 root window cursor is not set up correctly for some
reason, with this fix, users should at least see the correct cursor when
the pointer is over i3bar.

see issue #2114
2015-12-25 16:38:11 +01:00
Michael Stapelberg 0ebb4b2005 make: should be XCB_CURSOR, not XCURSOR
After all, we’re not using libXcursor, but libxcb-cursor :).
2015-12-25 16:37:44 +01:00
Michael Stapelberg 019ae6d06c Bugfix: don’t remove SubstructureRedirect event mask temporarily
This fixes race conditions, for example when i3bar gets reconfigured
after the available outputs change. In that specific case, i3bar sends a
ConfigureWindow request (see
b5693d6fb3/i3bar/src/xcb.c (L376))
which normally is turned into a ConfigureRequest that i3 largely
ignores, only the dock client’s height is considered (see
b5693d6fb3/src/handlers.c (L390)).

Turning ConfigureWindow into ConfigureRequest is only done when the
SubstructureRedirect event mask is set, and because we temporarily
removed _all_ events from our mask, the ConfigureWindow request went
through unmodified.

This in turn lead to the i3bar client window (not its decoration frame)
being positioned at e.g. y=1304, whereas dock client windows should
always end up at x=0 y=0 within their decoration frame. The result of
the i3bar client window being out of the visible space was either a
black i3bar or graphics corruption.

This also fixes issue #1904, I think. I couldn’t reproduce issue #1904
specifically, but when i3bar is in the misconfigured state, it will
receive a VisibilityNotify event, telling i3bar that it is obscured.
This would explain why i3bar sent a SIGSTOP in issue #1904.

fixes #1904
2015-12-22 22:33:37 +01:00
Michael Stapelberg b5693d6fb3 userguide: faq has moved to reddit 2015-12-20 13:12:37 +01:00
Michael Stapelberg d240d02e61 Merge pull request #2121 from Airblader/bug-base-10
Don't force base 10 for parsing id.
2015-12-17 22:10:06 +01:00
Ingo Bürk 68e3cb8ab7 Don't force base 10 for parsing id. 2015-12-17 09:43:34 -05:00
Ingo Bürk bba18453af Match on all criteria even if con_id or con_mark are given.
Previously, if a match specification contained the con_id or con_mark criterion,
all other criteria were ignored. However, a user may want to specify one of
those two unique identifiers and still specify others as well, for example to
match the currently focused window, but only if it has a certain WM_CLASS:

    [con_id=__focused__ class=special] kill

We now check all specified criteria.

fixes #2111
2015-12-17 08:56:05 -05:00
Michael Stapelberg af49a8cd0d Merge pull request #2102 from ccryx/next
Add support for _NET_WM_WINDOW_TYPE_NOTIFICATION
2015-12-16 08:58:59 +01:00
Michael Stapelberg dad9ec615b Merge pull request #2112 from Airblader/feature-multiple-tree-render
Avoid rendering the tree twice in a row
2015-12-16 08:56:11 +01:00
Florian Merkel 33f017daa9 Support matching _NET_WM_WINDOW_TYPE_NOTIFICATION
This commit fixes #1969 by adding support for matching a window's type
against _NET_WM_WINDOW_TYPE_NOTIFICATION. The userguide and tests were
updated to reflect this change.
2015-12-15 21:55:33 +01:00
Ingo Bürk 905bca3531 Avoid rendering the tree twice in a row
The callee already renders the tree if necessary, so despite the documentation
of the function, doing it again on the caller side is unnecessary.
2015-12-15 13:59:50 -05:00
Michael Stapelberg 954927ccc4 Merge pull request #2108 from Airblader/feature-2097
Allow mouse bindings to run on the root window.
2015-12-15 19:15:03 +01:00
Ingo Bürk 6f12f029f4 Allow mouse bindings to run on the root window.
Previously, mouse bindings could only be run when a window was present,
by using --whole-window. Such bindings would not work on empty
workspaces. However, this is a valid usecase for bindings like

    bindsym $mod+button4 workspace prev
    bindsym $mod+button5 workspace next

Hence, we need to grab the root window as well and run bindings on it.

fixes #2097
2015-12-14 16:26:36 -05:00
Michael Stapelberg 8e081d7fff Merge pull request #2105 from Airblader/bug-2099
Reject empty swallow definitions
2015-12-14 20:48:49 +01:00
Michael Stapelberg 5ad1890838 Merge pull request #2103 from Airblader/bug-2091
Reject invalid match criteria with an error.
2015-12-14 09:17:12 +01:00