Commit Graph

2396 Commits (41db90952222b5420bd642423fffc305d4c61cb3)

Author SHA1 Message Date
Ingo Bürk 41db909522 Activate root output if RandR request fails.
fixes #2011
2015-10-21 19:09:47 +02:00
Michael Stapelberg 8125b54e09 fix a memory leak in handle_get_bar_config 2015-10-19 19:13:15 +02:00
Michael Stapelberg 7b502cf44c Fix memleak in translate_keysyms 2015-10-19 18:53:59 +02:00
Michael Stapelberg fccf83294a Merge pull request #2004 from Airblader/bug-2003
Fix moving windows to a marked workspace by mark.
2015-10-18 12:26:37 +02:00
Ingo Bürk a172168e61 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-16 21:07:16 +02:00
hwangcc23 dd400ff74b Revise workspace next/prev
See the issue #1798 (http://github.com/i3/i3/issues/1798).

+workspace_next+ as-is cycles through either numbered or named workspaces,
but when it reaches the last numbered/named workspace, it only looks for
named workspaces. This commit changes it: look for named workspaces after
exhausting numbered ones, but also for numbered ones after exhausting
named ones.

Also add a test case 528-workspace-next-prev.t (numbered workspaces and named
workspaces on 2 outputs) for testing this.
2015-10-16 23:25:12 +08:00
Michael Stapelberg 7275174510 Merge pull request #1994 from Airblader/bug-1992
Make pango markup in mode names optional with a flag.
2015-10-13 12:08:42 -07:00
Ingo Bürk fec61791e1 Rename is_markup to pango_markup. 2015-10-13 09:59:26 +02:00
Ingo Bürk 82dc747396 Make pango markup in mode names optional with a flag.
This introduces the flag "--pango" on the mode config directive to
explicitly enable pango markup for mode names. Not setting this will
cause the mode name to be rendered as is.
This fixes a regression in 4.11 where mode names containing characters
such as '<' would break user's configs as they didn't escape these
characters.

fixes #1992
2015-10-13 09:23:30 +02:00
Ingo Bürk f7907c11d7 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-12 12:59:01 +02:00
Michael Stapelberg d24964ff6a Use sasprintf() 2015-10-11 20:42:52 +02:00
Michael Stapelberg 321bba224a Bugfix: add keymap fall back (_XKB_RULES_NAMES, then defaults)
fixes #1983
2015-10-11 20:24:16 +02:00
Ingo Bürk 1c4100ce5d Use 32-bit visuals for i3bar when possible and allow RGBA colors.
This patch creates all necessary windows for i3bar with 32-bit visuals if available.
It also introduces the possibility to define RGBA colors (next to RGB colors), which
allows the user to set the opacity of any color. This requires running a compositor.

With this patch we also start supporting _NET_SYSTEM_TRAY_VISUAL, which is necessary
for the tray icons so they create the tray window with the correct depth and visual.
2015-10-06 23:01:57 +02:00
Ingo Bürk b744c5e6c6 Refactor parsing of matches to avoid code duplication. 2015-10-04 17:40:25 +02:00
Michael Stapelberg 2248085c5c Merge pull request #1909 from Airblader/feature-refactor-1
Refactor rendering noodles a bit
2015-10-04 17:15:42 +02:00
Michael Stapelberg 77a7d625e1 Merge pull request #1965 from Airblader/feature-typed-commands-parser
Make the command parser stack typed
2015-10-04 17:05:27 +02:00
Michael Stapelberg 039494165a Merge pull request #1959 from hwangcc23/fix-1926
Check duplicated bindings after translating keysym
2015-10-02 19:51:42 +02:00
hwangcc23 fc48a297ed Check duplicated bindings after translating keysym
1). See the issue #1926. For example, the second keybinding is not detected as a duplicate:
        bindcode Mod4+24 sticky toggle
        bindsym Mod4+q focus parent
2). To fix it, check duplicated bindings when translating the keysym to keycodes.
2015-10-02 22:09:53 +08:00
Ingo Bürk 6cd6f43d09 Turn "char *" into "const char *" for all command parser functions. 2015-09-28 14:24:08 +02:00
Ingo Bürk c7ca6e1b41 Migrate the move command to use typed numbers. 2015-09-28 14:21:44 +02:00
Ingo Bürk 0ae9cddc98 Migrate the resize command to use typed numbers. 2015-09-28 14:21:44 +02:00
Ingo Bürk 23d5d704ed Allow the commands parser to use "number" arguments by making the stack typed. 2015-09-28 14:21:44 +02:00
Michael Stapelberg 71afed725a Merge pull request #1962 from Airblader/bug-move-to-output-criteria
Correctly handle command criteria for "move window to output".
2015-09-28 08:22:09 +02:00
Michael Stapelberg 2f9ed9c4c3 Merge pull request #1961 from Airblader/bug-1957
Avoid freeze when moving container
2015-09-28 08:19:23 +02:00
Michael Stapelberg 3830aa891e Merge pull request #1960 from Airblader/bug-restore-mark
Fix duplicated marks on append_layout
2015-09-28 08:19:04 +02:00
Ingo Bürk 852a2853e3 Correctly handle command criteria for "move window to output". 2015-09-26 21:31:28 +02:00
Ingo Bürk 594cd473b7 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
2015-09-25 19:43:43 +02:00
Ingo Bürk dd7a532160 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
2015-09-25 19:26:41 +02:00
Michael Stapelberg c82e6a87dc Merge pull request #1931 from Airblader/bug-1924
Improvements for sticky windows
2015-09-24 22:34:29 +02:00
Ingo Bürk 922afe1919 Keep a sticky window focused if it was the focused window on the source workspace.
fixes #1924
2015-09-24 22:10:17 +02:00
hwangcc23 94e7d13e17 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.
2015-09-23 00:16:25 +08:00
Ingo Bürk 2d4f8ce90b Set a proper WM_CLASS on frame windows. 2015-09-22 08:57:05 +02:00
Michael Stapelberg ee5db875c2 Merge pull request #1944 from tcatm/fix-vlog
log: avoid buffer overflow in vlog
2015-09-21 14:48:30 +02:00
Nils Schneider 717422c12c 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.
2015-09-21 14:27:22 +02:00
Michael Stapelberg 5775147d37 Merge pull request #1943 from tcatm/fix-no-randr-output
Don't create empty workspaces on restart
2015-09-21 13:56:43 +02:00
Nils Schneider f14efe85d1 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
2015-09-21 13:26:58 +02:00
Michael Stapelberg f3d898be4b Merge pull request #1937 from Airblader/bug-1910
Correctly restore floating windows
2015-09-21 10:18:25 +02:00
Michael Stapelberg 72b9909942 Merge pull request #1921 from tcatm/fix-no-randr-output
randr: use root window in case of no randr outputs
2015-09-21 10:17:21 +02:00
Michael Stapelberg 77d962f520 Merge branch 'debuglog-on-persist' of git://github.com/hwangcc23/i3 into hwangcc23-debuglog-on-persist 2015-09-21 10:05:14 +02:00
Ingo Bürk 55edbfe734 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
2015-09-20 12:31:29 +02:00
hwangcc23 b2bbd2c064 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.
2015-09-20 07:48:02 +08:00
Nils Schneider 78decb565a 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
2015-09-18 23:18:03 +02:00
Michael Stapelberg eb4a174788 Bugfix: load new keymap _before_ translating keysyms (Thanks Airblader)
fixes #1919
2015-09-17 22:34:59 +02:00
Michael Stapelberg d4fb17546c Merge pull request #1920 from Airblader/feature-1873
Set and unset individual atoms in _NET_WM_STATE
2015-09-17 10:08:27 +02:00
Ingo Bürk 034815b8fd 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
2015-09-17 09:13:12 +02:00
Ingo Bürk b490f67925 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
2015-09-16 19:52:08 +02:00
Nils Schneider c87b256200 Revert "Add a timeout: delay_exit_on_zero_displays"
This reverts commit 2c77d7ceed.
2015-09-14 22:34:05 +02:00
Michael Stapelberg 7de15b3815 clang-format
(When will I learn? I need to integrate clang-format into my editor.)
2015-09-14 10:22:43 +02:00
Michael Stapelberg 840ce51bfd Extract workspace names from bindings before reordering.
fixes #1889
2015-09-14 09:28:42 +02:00
Ingo Bürk 1c4c3f06fa 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.
2015-09-13 20:40:20 +02:00