Commit Graph

5886 Commits

Author SHA1 Message Date
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 1f9f44b694 travis: install clang-format-3.5 from llvm repository
Ubuntu utopic disappeared from archive.ubuntu.com, it’s EOL.
2015-10-28 22:13:34 +01:00
Michael Stapelberg 82806f3857 Bugfix: correctly compare modifier mask when identifying keybindings
fixes #2002
2015-10-28 21:56:55 +01:00
Ingo Bürk 4779e59c50 Fix multiple memory leaks with regular expressions. 2015-10-28 21:56:53 +01:00
Ingo Bürk a22dec02f8 Refactor parsing of matches to avoid code duplication. 2015-10-28 21:56:52 +01:00
Ingo Bürk f02413b4cf 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-28 21:56:50 +01:00
Ingo Bürk 1f953719c9 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-28 21:56:49 +01:00
Ingo Bürk 0aa8d05b54 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-28 21:56:47 +01:00
Ingo Bürk 7c75d61a39 Activate root output if RandR request fails.
fixes #2011
2015-10-28 21:56:46 +01:00
Adaephon-GH 76db8b73ae Make rendering of key bindings more consistent
- Render key names and key bindings verbatim if they could be used like
  that in the configuration (no special format for "colloquial" names:
  Alt, Windows, ...)
- Use only lower case letters for key bindings
2015-10-28 21:56:45 +01:00
Adaephon-GH 2e5cfdeea0 Improve placement of explicit IDs for headings
In some cases the IDs of section titles was placed after the section
title. With that in the rendered HTML the ID was placed on the paragraph
and not on the heading. This led to heading not being shown when the
corresponding link was clicked.
2015-10-28 21:56:43 +01:00
Adaephon-GH 2a22b5d561 Quote __focused__ to prevent parsing by asciidoc
Text between two "__" is rendered as italics by asciidoc. This affects
the display of the new __focused__ special value for criteria.
2015-10-28 21:56:41 +01:00
Michael Stapelberg 724cfebe5e fix a memory leak in handle_get_bar_config 2015-10-28 21:56:39 +01:00
Michael Stapelberg 5648221d06 Fix memleak in translate_keysyms 2015-10-28 21:56:34 +01:00
Ingo Bürk 27535398f5 Turn "char *" into "const char *" for all command parser functions. 2015-10-28 21:56:17 +01:00
Ingo Bürk 9978050d91 Migrate the move command to use typed numbers. 2015-10-28 21:56:16 +01:00
Ingo Bürk a271666fa7 Migrate the resize command to use typed numbers. 2015-10-28 21:56:14 +01:00
Ingo Bürk f5f5683fa7 Allow the commands parser to use "number" arguments by making the stack typed. 2015-10-28 21:56:11 +01:00
Adaephon-GH 5049990284 Fix erroneous headline for moving to mark
The headline indicated that it would be possible to move containers and *workspaces* to marks but the following text clearly shows that it should state containers and *windows*.
2015-10-28 21:55:07 +01:00
Ingo Bürk 0a16a4b5e5 Add proper documentation for binding modes.
fixes #1996
2015-10-28 21:55:05 +01:00
Ingo Bürk ab9d74b434 Fix moving windows to a marked workspace by mark.
When a window is moved to a mark and the marked container is a workspace,
we can skip any other logic and just call con_move_to_workspace directly.

fixes #2003
2015-10-28 21:55:03 +01:00
Ingo Bürk bfd9960df2 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
2015-10-28 21:55:00 +01:00
Michael Stapelberg 94bdf607bb Use sasprintf() 2015-10-28 21:54:58 +01:00
Michael Stapelberg 62bb7af5c3 Bugfix: add keymap fall back (_XKB_RULES_NAMES, then defaults)
fixes #1983
2015-10-28 21:54:55 +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