Commit Graph

5558 Commits (6b3d8b9e8b45b999a7da19ef2c0831ec0e050530)

Author SHA1 Message Date
Ferdinand Bachmann 6b3d8b9e8b Bugfix: NULL dereference when stickying _NET_WM_DESKTOP_ALL windows (#2488)
In some cases, ws will be NULL here.

Originally tested with "lemonbar"
2016-10-03 05:53:56 -07:00
Ingo Bürk c71f6f8f7c Implement special value 'current' for output. (#2483)
This commit introduces the special 'current' value for outputs in both of

* move con to output current
* move workspace to output current

fixes #2357
2016-09-30 08:28:02 -07:00
Ingo Bürk 6a8fb69eff Added new criteria 'tiling' / 'floating'. (#2481)
These criteria allow selecting only windows in a specific mode, i.e.,
tiling and floating, respectively.

fixes #2406
2016-09-27 19:04:00 -07:00
Michael Stapelberg 0e73a6e9e7 Remove conditional compilation for cairo/pangocairo (#2480)
We strive to avoid conditional compilation in i3 as much as possible.
cairo and pangocairo have been around long enough in the versions that
we need that it’s time to unconditionally depend on them.

Also update DEPENDS with the last-known-good-versions while at it.
2016-09-27 12:57:00 -07:00
Ingo Bürk a15ce8cb8d Assign the sticky value for _NET_WM_DESKTOP on scratchpad windows. (#2457)
fixes #2456
2016-09-26 22:39:17 -07:00
Michael Stapelberg c93056b2d8 Unconditionally depend on libpcre >= 8.10 (#2472)
Even Debian oldstable has 8.30, so let’s get rid of conditional
compilation where we don’t actually need it.
2016-09-26 19:04:13 -07:00
Ingo Bürk f4f9b7102d Handle _NET_ACTIVE_WINDOW for scratchpad windows. (#2458)
We call scratchpad_show() on _NET_ACTIVE_WINDOW requests if the request
came from a pager. This is consistent with the i3 »focus« command because
we assume the user requested to see the window, so we do the only
sensible thing.

fixes #2455
2016-09-26 18:32:05 -07:00
Ingo Bürk b638ce2e4c Check output crossing on ENTER_NOTIFY to dockarea. (#2477)
When receiving an ENTER_NOTIFY event on a dock client we returned as to not
focus the dock client (cf. #321 and #323). However, we still need to check
for crossing output boundaries and if that happened focus the new output.

Otherwise it can happen that the cursor is on a different output than the
focused output. When opening a window, this would open it on the old output
and then warp the mouse there. This effect will be even worse if the window
is immediately moved with 'move position mouse' as the window will end up
in its correct position on the new output and the cursor warped to the old
output.

relates to #2081
2016-09-26 18:31:16 -07:00
Michael Stapelberg f0cea63fd5 Merge pull request #2469 from Airblader/feature-2465
Use Xft.dpi for DPI if available.
2016-09-26 18:30:18 -07:00
Michael Stapelberg 121528935e Merge pull request #2479 from stapelberg/fix-perl
Make tests work with Perl ≥ 5.24 (now in Debian sid)
2016-09-26 16:12:13 -07:00
Michael Stapelberg 8f9138fbad t/158-wm_take_focus.t: avoid shift on scalars
This feature is forbidden in Perl ≥ 5.24:

  Experimental shift on scalar is now forbidden at
  ./t/158-wm_take_focus.t line 94, near ");"
2016-09-26 20:42:51 +02:00
Michael Stapelberg 47b84ca5ed travis-base.Dockerfile: depend on perl, not perl-modules
As per the package description, perl-modules is an implementation detail
and packages should depend on perl instead.
2016-09-26 20:42:51 +02:00
Ingo Bürk 889d0abe8f Set $HOME for tests.
We add $HOME to the environment variables we define for a test case
in order to redirect it from the user's actual home directory. This
is necessary because xcb-util-xrm will fall back to $HOME/.Xresources
when determining the DPI. If a user has this set to, e.g., 192 on their
machine, this would break tests.

Since tests shouldn't rely on the system they run in, we redirect the
home directory altogether to simulate a clean slate.

relates to #2465
2016-09-26 20:29:53 +02:00
Ingo Bürk cb1fcfed6a Use Xft.dpi for DPI if available.
fixes #2465
2016-09-26 20:29:53 +02:00
johannes karoff 1437271e65 do not match docks in config and command criteria (#2340) 2016-09-26 09:45:58 -07:00
koebi 655ed0ba27 fix i3bar crashing when I3SOCK present (#2471)
When I3SOCK is present, socket_path might be a pointer to an
environment variable, which cannot be free'd in line 157. This
commit duplicates the string if I3SOCK is present, thus making
socket_path a free-able pointer again.
2016-09-26 08:01:30 -07:00
Michael Stapelberg 23ee16077a travis: build ubuntu packages for xenial, not wily (#2474)
The extra rm command when configuring the repository is necessary
because of https://bugs.debian.org/838779.
2016-09-24 12:24:47 -07:00
Ingo Bürk d4bf7b94d4 Fix link in the documentation. (#2462)
This replaces the dead pull request #2242. Thanks to @pniederlag for noticing the
issue and providing the original PR.
2016-09-24 10:53:02 -07:00
Michael Stapelberg 9bf346c7a0 Remove compatibility definitions for xcb-util < 0.3.8 (#2473)
Even Debian oldstable has xcb-util 0.3.8.
2016-09-24 09:48:32 -07:00
Michael Stapelberg 14f49aa6d3 travis/cleanup-bintray: use dpkg --compare-versions (#2453)
…instead of lexicographically sorting strings, which fails for the
following situation:

    4.12-96-g086276b
    4.12-97-g59c070b
    4.12-108-gb850cfb

This bug resulted in new packages being built and uploaded, then
immediately deleted.

Thanks to eeemsi for reporting the issue.
2016-09-24 08:16:02 -07:00
Michael Stapelberg b850cfba4d Fix memleaks by avoiding _checked variants when discarding the result
Thanks psychon for pointing this out in
https://github.com/i3/i3/pull/2450#discussion_r78560433!
2016-09-14 09:22:45 +02:00
Michael Stapelberg 5594139676 Eliminate once-used check_error utility function 2016-09-14 09:19:25 +02:00
Ingo Bürk d48c9b1e33 Fix colormap handling for containers. (#2450)
This commit correctly handles colormaps by

* Using the static default colormap we determine on startup if the
  con has the corresponding depth. This avoids creating pointless
  colormaps.
* Not freeing the default colormap to not have stray colormaps on
  containers. This fixes an issue with certain programs such as xwd.
* Creating a custom colormap when necessary and freeing it when the
  container is killed.

fixes #2435
2016-09-14 09:13:17 +02:00
Michael Stapelberg 555f458d7a Bugfix: don’t apply shift+numlock fallback for keypad keys
fixes #2418
2016-09-12 22:24:23 +02:00
Michael Stapelberg 4765a8fb84 Merge branch 'nmschulte-fix_numlock_shift' into next 2016-09-12 22:23:10 +02:00
Nathan Schulte 41ce596a94 fix bindsyms with Shift, given NumLock tweaks 2016-09-12 22:22:59 +02:00
Nathan Schulte 02f206d816 fix typo in logging message 2016-09-12 22:22:59 +02:00
Michael Stapelberg 2244c843a8 Bugfix: don’t trigger unrelated key bindings for --release bindings
fixes #2442
2016-09-12 12:57:13 +02:00
Michael Stapelberg b00d36fca5 t/264-keypress-numlock: add a test covering shift
related to #2418
2016-09-12 12:10:59 +02:00
Michael Stapelberg 0469716fd6 Bugfix: compare all resolved modifier masks
Before this commit, i3 only compared the user-specified modifiers and
incorrectly ignored the resolved modifiers (such as the numlock
fallback).

While at it, also fix the testcase which treated numlock as a momentary
modifier, whereas it really is a latched modifier.

fixes #2418
2016-09-12 12:05:38 +02:00
Michael Stapelberg 5ca7d4b222 expose binding pointer in debug messages
This makes it a bit easier to match up the different messages to the
configured binding.
2016-09-12 12:03:30 +02:00
Michael Stapelberg 59c070bffc travis: pass through CC to run-tests
fixes #2437
2016-09-05 09:01:41 +02:00
Michael Stapelberg 086276b329 travis: only enable asan workaround for clang (breaks gcc)
fixes #2437
2016-09-05 08:55:40 +02:00
Michael Stapelberg 6584f70d28 travis: work around asan broken-ness with libc ≥ 2.24
fixes #2437
2016-09-05 08:42:34 +02:00
Michael Stapelberg f62eb9f533 Bugfix: re-add single quotes around I3_VERSION
Without single quotes, the version is not passed correctly to the
compiler, and building Debian packages fails.

related to #2437
2016-09-05 08:19:02 +02:00
Michael Stapelberg fac57699b4 Bugfix: avoid setting urgency hint on content container and above
fixes #2098 (I _think_)
2016-09-04 21:08:21 +02:00
Michael Stapelberg 18183b8407 Merge pull request #2393 from bebehei/fix-workspace-next_prev
fix #2383 for numbered workspaces
2016-08-28 18:28:25 +02:00
Benedikt Heine 7a94dfd11d add additional reversed testcase 2016-08-24 11:11:50 +02:00
Benedikt Heine e35aff5cb9 fix transition from named to numbered workspace 2016-08-24 11:11:50 +02:00
Benedikt Heine 930733f352 enhance test 528
Enhancing test 528 to test workspace_next and workspace_prev
- Adding tests for worksace_prev
- Mixing workspace distribution over outputs
2016-08-24 11:11:50 +02:00
Benedikt Heine 5d6d974c66 remove goto statement
remove goto statement to similarize workspace_next and workspace_prev
2016-08-24 11:11:50 +02:00
Benedikt Heine d979748853 traverse numbered workspaces in correct order 2016-08-24 11:11:50 +02:00
eplanet b668d62cfc Deleting VERSION and extracting it from I3_VERSION instead (#2419) 2016-08-13 13:46:27 -07:00
Michael Stapelberg 012de8cd6f Merge pull request #2301 from EvilPudding/next
Minor optimization
2016-08-03 18:43:35 +02:00
EvilPudding 96704b2fc0 Leaving the last byte in Colorpixel.hex NULL
Added explicit assignment of last byte to the null character, for
appearence's sake.
2016-08-03 13:09:58 +00:00
EvilPudding 08c2380545 Hex in struct Colorpixel.hex to contiguous memory
No reason for hex not to be of a constant size, and
no reason to introduce a cache miss by allocating it
separated from the rest of the structure.
2016-08-03 13:09:58 +00:00
Michael Stapelberg d77d40173a Only add NumLock fallback where necessary.
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
2016-08-02 20:34:20 +02:00
Michael Stapelberg 3bd5e6e5c8 refactoring: store modifiers alongside translated keycodes
This is a no-op refactoring in terms of functionality.

related to #2346
2016-08-02 20:10:49 +02:00
Michael Stapelberg 0239c4b6da move xkb_current_group check into own function
This is a no-op refactoring.
2016-08-02 19:33:26 +02:00
Michael Stapelberg afb90a0f97 remove superfluous check for input_type
This condition is already enforced in grab_all_keys().
2016-08-02 19:31:23 +02:00