Commit Graph

5273 Commits

Author SHA1 Message Date
Ingo Bürk d9bbfb7b35 Fix draw_util_copy_surface.
This patch fixes a bug when copying one surface to another.
Since it only exposes itself when used with non-trivial source
coordinates, it didn't surface before when only used for i3bar.

relates to #1278
2015-11-23 22:18:02 +01:00
Ingo Bürk 90d94298fa Move draw_util.c to libi3.
In order to prepare for using cairo for rendering i3 decorations,
we need to make the draw_util.c from i3bar available via libi3 such
that both i3bar and i3 can use it.

relates to #1278
2015-11-23 22:18:02 +01:00
Michael Stapelberg 008e32fe3e Merge pull request #2078 from acrisci/bug/detect-base16-conid
Bug: parse con_id base 16
2015-11-23 22:07:08 +01:00
Michael Stapelberg 60af7d829b Merge pull request #2079 from tyll/contact
Fix contact information
2015-11-22 20:00:33 +01:00
Till Maas 3e11c66aeb Fix contact information
fixes #2077
2015-11-22 19:57:46 +01:00
Tony Crisci 8f90b8448b Bug: parse con_id base 16
Mouse bindings that target the window that was clicked send the command
to the parser with `con_id` of the clicked window serialized base 16
for compatability with FreeBSD. See 7c2842e for explaination.

Set base to 0 for strtol to handle base 16 numbers for that reason.

This allows mouse bindings that target specific windows to work
correctly. Without this change, the focused window is always targetted
rather than the window that was actually clicked.

Regression introduced in b744c5e.
2015-11-22 13:32:21 -05:00
Michael Stapelberg 233a22cb10 Merge pull request #2074 from Airblader/feature-2064
Support _NET_WM_USER_TIME.
2015-11-21 23:04:49 +01:00
Ingo Bürk 00881bb156 Support _NET_WM_USER_TIME.
With this patch, we support the special value "0" for _NET_WM_USER_TIME
on a window upon managing it, which indicates that the window shall not
be focused.

fixes #2064
2015-11-21 22:48:48 +01:00
Michael Stapelberg 46bb6cdfbb Merge pull request #2076 from Airblader/feature-document-rects
Document rect, window_rect and deco_rect.
2015-11-21 22:44:31 +01:00
Ingo Bürk 8016cce447 Document rect, window_rect and deco_rect. 2015-11-21 21:52:43 +01:00
Michael Stapelberg 2bf09dffe9 Merge pull request #2071 from tyll/https
Use https if possible
2015-11-19 14:10:42 +01:00
Till Maas 913fb60a6a Use https if possible
git:// and http:// do not protect the integrity of the accessed data.
Therefore use https instead.
2015-11-19 13:32:35 +01:00
Michael Stapelberg b255d140be Merge pull request #2061 from Airblader/bug-2049
Only grab scrollwheel buttons if necessary
2015-11-16 00:49:27 -08:00
Michael Stapelberg 6a7f9370db Add i3test::XTEST, add 2 test cases for key bindings 2015-11-16 09:37:54 +01:00
Michael Stapelberg e48c4cd257 Revert "Bugfix: set group mask 1 by default, correctly compare modifiers"
This reverts commit 9692c1498b.

That commit accidentally defaulted to group mask 1, but the default
should be to match any group mask, so that having multiple layouts
loaded at the same time works.

fixes #2062
2015-11-16 09:00:27 +01:00
Ingo Bürk 029d78c0bf Only grab scrollwheel buttons if necessary.
With this patch, we only grab the scrollwheel buttons (4 and 5) when
managing a window if a whole window key binding exists for these buttons.

This allows both of these usecases:
  - Bindings to scrollwheel buttons using --whole-window (see #1701).
  - Scrolling in a window without focusing it if no such binding
    exists (see #2049).

Furthermore, we drop all button grabs and regrab them after a config
reload in order to reevaluate the new bindings correctly.

fixes #2049
2015-11-15 22:08:47 +01:00
Ingo Bürk 66882bf445 Extract function to grab buttons when managing a window.
We refactor the button grabbing into a function to allow the next patch
both to
  - conditionally grab different sets of buttons
  - grab the buttons again when reloading the config.

relates to #2049
2015-11-11 20:21:26 +01:00
Michael Stapelberg ff63104a2d Merge pull request #2058 from Airblader/feature-rename-flag
Rename I3BAR_CAIRO to CAIRO_SUPPORT.
2015-11-09 21:17:07 +01:00
Ingo Bürk 38fcaf3fa8 Rename I3BAR_CAIRO to CAIRO_SUPPORT. 2015-11-07 14:28:45 -05:00
Michael Stapelberg f836e4c771 Merge pull request #2053 from Airblader/feature-2048
Raise dependency to cairo 1.14.4.
2015-11-03 08:44:02 +01:00
Ingo Bürk 1d6827a0fd Raise dependency to cairo 1.14.4.
With the recent cairo bugfix, we can now switch to using cairo for
rendering i3bar per default by raising the minimum version of cairo
to 1.14.4, if this cairo version is available.

resolves #2048
2015-11-02 17:32:04 -05:00
Michael Stapelberg 31121f1334 Merge pull request #2054 from hwangcc23/fix-2051
Fix config validation fail when no new line from end of file
2015-11-02 20:13:20 +01:00
Michael Stapelberg 911ce37871 Merge pull request #2055 from Airblader/bug-2044
Remove autostart commands after they have been executed.
2015-11-02 20:10:53 +01:00
Ingo Bürk f2209a873c Remove autostart commands after they have been executed.
As there is no need to keep autostart commands in memory, we can safely
remove them as soon as they have been executed. As we previously didn't
clear them at all during config reloads, this also fixes a memory leak.

Note that neither autostarts nor autostarts_always is executed during
config reloads, so removing them from memory is fine as an i3 restart
will cause them to be parsed again.

fixes #2044
2015-11-02 09:21:43 -05:00
hwangcc23 18b3f09970 Fix config validation fail when no new line from end of file
1. i3 config validation failed when the new line is missing from the end of file.
   The error was: "ERROR: Your line continuation is too long, it exceeds 4096 bytes".
   It is wrong to assume that there is always a '\n' at the end of each line in the config file.
   (Not for the last line.)
   Fix it via adding a end-of-file check.

2. See the issue #2051. (https://github.com/i3/i3/issues/2051)
2015-11-02 22:12:44 +08:00
Michael Stapelberg bb7a36e0c7 Merge pull request #2001 from Airblader/feature-multiple-tray-output
Allow multiple tray_output directives.
2015-11-02 09:18:26 +01:00
Ingo Bürk 5b9fb51b37 Fix memory leaks in modes and bar bindings. 2015-11-01 16:35:17 -05:00
Ingo Bürk bc250b26a0 Allow multiple tray_output directives.
This patch introduces the possibility to specify the tray_output directive
multiple times. All values will be used by i3bar, in the order they are
given.

This way, a single bar configuration can be used for several machines with
internal output names "eDP1" and "LVDS-0" by specifying tray_output for both.
Any external output (e.g., "DP-0") will still not receive the tray. The same
effect can be achieved by using "primary", but forces the user to couple the
tray display to the primary output which may not be desirable behavior.

relates to #555
2015-11-01 16:35:17 -05:00
Michael Stapelberg beb89e64b4 Bugfix: ignore XKB group bits in floating_modifier
fixes #2046
2015-10-30 08:38:53 +01:00
Michael Stapelberg 9692c1498b Bugfix: set group mask 1 by default, correctly compare modifiers
fixes #2002
2015-10-29 08:47:36 +01:00
Michael Stapelberg 0e5180cae9 Bugfix: correctly compare modifier mask when identifying keybindings
fixes #2002
2015-10-28 21:42:37 +01:00
Michael Stapelberg b330050df7 Merge pull request #2043 from Airblader/bug-regex-mem-leak
Fix multiple memory leaks with regular expressions.
2015-10-28 18:55:26 +01:00
Ingo Bürk 27db61f504 Fix multiple memory leaks with regular expressions. 2015-10-28 14:40:10 +01:00
Michael Stapelberg 3295e05089 Merge pull request #2030 from DavidMikeSimon/focus-bar-color
Optionally change i3bar color on focused output, implements #2020
2015-10-27 19:57:15 +01:00
David Simon dc05d905c1 Optionally change i3bar color on focused output, implements #2020 2015-10-27 09:12:57 -04:00
Michael Stapelberg 2451551f63 Merge pull request #2040 from Airblader/bug-2034
Fix crash when trying to split and float a dock container.
2015-10-27 10:07:25 +01:00
Michael Stapelberg c1807163c7 Merge pull request #2041 from Airblader/feature-2028-2
Add --no-auto-back-and-forth for moving windows.
2015-10-27 08:50:48 +01:00
Ingo Bürk 57a7ff301f Add --no-auto-back-and-forth for moving windows.
This patch extends the previously introduced flag --no-auto-back-and-forth
to also apply to

    move window to workspace <name>
    move window to workspace number <number>

relates to #2028
2015-10-26 22:40:06 +01:00
Ingo Bürk 3d6c76eb93 Fix crash when trying to split and float a dock container.
Since splitting a docking container was allowed and successful, the check
to prevent floating it fails to work. This causes a crash because the
workspace of the container cannot be determined as the dockarea is higher
up in the tree than the workspace it belongs to.

This patch extends to sanity check to nested dock containers when trying to
float a container and also disallows manually splitting a docked container
or changing its layout.

fixes #2034
2015-10-26 22:14:14 +01:00
Michael Stapelberg d187214562 Merge pull request #2039 from DavidMikeSimon/fix-1824
Use separate buffers for i3bar statusline for each workspace, track short and long renders separately, fixes #1824
2015-10-26 21:26:53 +01:00
David Simon 071f11f9b9 Use separate buffers for i3bar statusline for each workspace, track short and long renders separately, fixes #1824 2015-10-26 16:15:01 -04:00
Michael Stapelberg 30c3729a24 Merge pull request #2036 from Airblader/bug-2015
Make resize grow|shrink width|height work for a nested split in the s…
2015-10-26 09:14:28 +01:00
Michael Stapelberg d35ee4501b Merge pull request #2031 from Airblader/feature-2028
Added --no-auto-back-and-forth to workspace commands.
2015-10-25 16:51:32 +01:00
Michael Stapelberg b328d2423e Merge pull request #2037 from Airblader/bug-run-assignments
Fix assignments bug and a small logging bug
2015-10-25 16:48:32 +01:00
Ingo Bürk ad10a366d6 Mark assignment as run before executing it.
We need to store the information that an assignment was run for a window
before actually executing the command. Otherwise, if the command causes
a change that causes assignments to be run again, the window might be
matched again, causing an infinite loop and hence i3 to freeze or crash.
2015-10-25 14:27:08 +01:00
Ingo Bürk ac4ac94181 Fixed logging statement.
Assignments don't necessarily represent workspace assignments, but could
also be used, e.g., for no_focus. Hence, there's no point in logging
dest.workspace for all assignments.
2015-10-25 14:25:55 +01:00
Ingo Bürk 10b1b39478 Make resize grow|shrink width|height work for a nested split in the same direction.
Suppose a horizontally oriented workspace has two windows open. Issuing "split h" on
the right window creates a nested horizontal container. If we now resize in "width"
direction, the resize doesn't work because it will only operate on the current parent,
which is a container with only one child, so the resize command exits.

This is unexpected behavior from a user point of view. Hence, with this patch, we
ensure that we don't just go up the tree until we find a parent with the correct
orientation, but also keep going if that parent has only a single child.

fixes #2015
2015-10-25 13:03:56 +01:00
Ingo Bürk 7270206e24 Added --no-auto-back-and-forth to workspace commands.
This patch introduces the --no-auto-back-and-forth flag to both of

    workspace --no-auto-back-and-forth <name>
    workspace --no-auto-back-and-forth number <number>

This flag will only have an effect if the back_and_forth feature is
enabled. If passed, the feature will be ignored for this particular
call only.

fixes #2028
2015-10-24 00:12:03 +02:00
Michael Stapelberg 185a2f24ba Merge pull request #2027 from Airblader/feature-cleanup-1
Remove broken and unused debug borders.
2015-10-23 08:34:55 +02:00
Ingo Bürk f676781576 Remove broken and unused debug borders. 2015-10-23 00:38:11 +02:00