Commit Graph

1835 Commits

Author SHA1 Message Date
Michael Stapelberg 19dc92a9a5 new parser: correctly handle leading/trailing newlines (+test) (Thanks helgikrs) 2012-01-25 22:00:32 +00:00
Fernando Tarlá Cardoso Lemos d579992528 Force redrawing the indicators after a move.
Fixes a bug where splitting then moving in the other orientation
(e.g. v-splitting and moving right) would result in the old
indicators not disappearing.
2012-01-22 17:25:08 +00:00
Michael Stapelberg ae049449af force rendering in more cases 2012-01-22 17:24:55 +00:00
Michael Stapelberg ef522b4dc1 Force re-rendering after changing the orientation of a split container 2012-01-22 13:19:37 +00:00
Michael Stapelberg f9bc434e2a Implement highlighting right/bottom borders of splitted windows
Fixes #299
2012-01-22 11:22:15 +00:00
Michael Stapelberg 318d4fdeef make in-place restarts use socket activation, too (for faster/less flaky tests) 2012-01-21 23:03:09 +00:00
Michael Stapelberg 3b7f4d428e Correctly restore focus after in-place restarts
Note: This change requires two in-place restarts when you are upgrading
in-place from an old version.

Fixes #611
2012-01-21 18:35:15 +00:00
Michael Stapelberg fabcd7d911 Merge branch 'master' into next 2012-01-21 15:08:36 +00:00
Michael Stapelberg 077d2433a7 Bugfix: Fix coordinates when the rect of an output changes (Thanks Paul)
Fixes #623
2012-01-21 15:07:53 +00:00
Michael Stapelberg fc27c19761 Merge branch 'master' into next
Conflicts:
	testcases/t/005-floating.t
2012-01-21 14:22:29 +00:00
Michael Stapelberg cb4c9b9d27 Bugfix: Position floating windows exactly where their geometry specified (Thanks B-Con)
Fixes #619
2012-01-21 14:20:55 +00:00
Michael Stapelberg 6ffc0f94cb Ignore aspect ratio during fullscreen mode (fixes MPlayer subtitles) (Thanks mxf, alexander)
Fixes: #594
2012-01-21 13:29:06 +00:00
Michael Stapelberg 8d72a77c7a Merge branch 'master' into next
Conflicts:
	src/handlers.c
2012-01-21 11:50:22 +00:00
Michael Stapelberg 7a4d8ed6ed Bugfix: Force a new sequence number after UnmapNotify
This should fix the problem where (legitimate) EnterNotifys arrived with the
same sequence as the UnmapNotify and was ignored.

Fixes: #609
2012-01-21 11:49:46 +00:00
Michael Stapelberg 27b089e430 Fix prototype 2012-01-21 11:49:35 +00:00
Michael Stapelberg 47fd15649a Bugfix: Only ignore EnterNotify events after UnmapNotifies from managed windows
This should fix (some?) focus follows mouse problems.

Conflicts:

	src/handlers.c
2012-01-21 11:46:23 +00:00
Michael Stapelberg fa83b46dfa Draw a separator line after each tab (doesn’t use extra space) (by Aaron Small) 2012-01-21 11:07:10 +00:00
Michael Stapelberg 1784b3858d Bugfix: Redraw right border after rendering the window title (Thanks fernandotcl)
Fixes #368
2012-01-21 11:03:57 +00:00
Michael Stapelberg 45b4d71a0b handle the old bar color config syntax in a backwards-compatible way 2012-01-20 22:26:17 +00:00
Michael Stapelberg 31b7ec29fd Re-implement bar borders (by Angelo Haller)
This re-introduces borders around the workspace buttons in i3bar.
No additional pixels will be consumed (you will not lose any space for your
windows).
2012-01-20 21:36:50 +00:00
Michael Stapelberg 759ed0b6e3 Merge branch 'master' into next 2012-01-20 18:10:52 +00:00
Michael Stapelberg 4f26d6f2a1 Bugfix: Setup the _NET_SUPPORTING_WM_CHECK atom in a standards-compliant way
This makes chrome (and probably other apps, too) receive changes of the
_NET_ACTIVE_WINDOW and thus show its bookmark dialog properly.

Fixes: #544
2012-01-20 18:09:53 +00:00
Michael Stapelberg a2823d3aeb Bugfix: Don’t increment 'walk' before checking it (Thanks MasterofJOKers) 2012-01-19 19:01:47 +00:00
Michael Stapelberg fd8e1c98c9 Merge branch 'master' into next
Conflicts:
	src/handlers.c
2012-01-18 19:18:22 +00:00
Michael Stapelberg 2d14ced024 Bugfix: Respect WM_HINTS.input for WM_TAKE_FOCUS clients
This fixes problems with Qt apps (like Quassel) and apparently Eclipse since
the last commit.
2012-01-18 19:16:57 +00:00
Michael Stapelberg f32cc6f4ae Merge branch 'master' into next 2012-01-17 23:39:04 +00:00
Michael Stapelberg 21a2971b24 Bugfix: Either use SetInputFocus *or* send WM_TAKE_FOCUS, not both
This fixes problems with the Oracle JRE7, which checks the current focus after
receiving WM_TAKE_FOCUS and just does nothing when the focus is on one of its
windows. Hopefully it doesn’t introduce any regressions :).
2012-01-17 23:33:33 +00:00
Michael Stapelberg 62cde927a5 Bugfix: Only ignore EnterNotify events after UnmapNotifies from managed windows
This should fix (some?) focus follows mouse problems.
2012-01-17 20:37:36 +00:00
Michael Stapelberg a532f5ac39 Implement a new parser for commands. (+test)
On the rationale of using a custom parser instead of a lex/yacc one, see this
quote from src/commands_parser.c:
     We use a hand-written parser instead of lex/yacc because our commands are
     easy for humans, not for computers. Thus, it’s quite hard to specify a
     context-free grammar for the commands. A PEG grammar would be easier, but
     there’s downsides to every PEG parser generator I have come accross so far.

     This parser is basically a state machine which looks for literals or strings
     and can push either on a stack. After identifying a literal or string, it
     will either transition to the current state, to a different state, or call a
     function (like cmd_move()).

     Special care has been taken that error messages are useful and the code is
     well testable (when compiled with -DTEST_PARSER it will output to stdout
     instead of actually calling any function).

During the migration phase (I plan to completely switch to this parser before
4.2 will be released), the new parser will parse every command you send to
i3 and save the resulting call stack. Then, the old parser will parse your
input and actually execute the commands. Afterwards, both call stacks will be
compared and any differences will be logged.

The new parser works with 100% of the test suite and produces identical call
stacks.
2012-01-14 21:29:57 +00:00
Michael Stapelberg f81c89ac28 Refactor the code out of src/cmdparse.y to src/commands.c
This is the first step towards our new parser.
2012-01-14 16:59:52 +00:00
Michael Stapelberg 608def6c6e cmdparse.l: [^t] is enough (Thanks f8l) 2012-01-10 23:09:00 +00:00
Michael Stapelberg 814695d8bb Implement 'move workspace to output <output>'
Fixes: #541
2012-01-10 22:16:50 +00:00
Michael Stapelberg df9b338175 Introduce synonyms: 'move to workspace' and 'move container to workspace' and 'move window to workspace'
This makes the new 'move workspace to output' command much more clear
2012-01-10 22:16:09 +00:00
Michael Stapelberg 6df971d5d5 Ignore next_on_output/prev_on_output when looking for the first workspace 2012-01-08 16:31:07 +00:00
Max Alexander Busse fba2582b2e Switch and Move to next workspace on the same Output. As requested in \#554 2012-01-08 16:24:21 +00:00
dbp a3081c488a Allow different modifier keys for showing hidden i3bar. 2012-01-08 12:47:41 +00:00
Michael Stapelberg f88c779457 Merge branch 'master' into next 2012-01-08 12:30:41 +00:00
Michael Stapelberg 96c491a488 Bugfix: Fix assignments of floating windows to (yet) unused workspaces (Thanks zeus)
The problem was that the workspace was considered empty for a brief period of
time when entering floating mode. This happened when you assigned Gimp to a
workspace which is not in use yet.
2012-01-08 12:28:49 +00:00
Michael Stapelberg 47a25aa883 bump copyright 2012-01-08 12:00:19 +00:00
Michael Stapelberg 5c3077bc78 wrap 'focus output': when on the right-most output and focusing right, it will focus the left-most output 2012-01-08 11:58:45 +00:00
Michael Stapelberg e3051629d1 remove trailing whitespace and empty lines 2012-01-08 11:44:01 +00:00
Max Alexander Busse d0b3a943f0 Feature: focus the output right/left/above/below 2012-01-08 11:43:31 +00:00
Michael Stapelberg 470ee00012 Merge branch 'master' into next 2012-01-07 18:50:46 +00:00
Michael Stapelberg d4238c778a Bugfix: Open new windows in the correct place when assignments match (+test) (Thanks Don) 2012-01-07 18:50:00 +00:00
Michael Stapelberg 6345124049 Merge branch 'master' into next
Conflicts:
	src/con.c
2012-01-07 18:21:12 +00:00
Michael Stapelberg f78caf8c58 Bugfix: Don’t lose focus on fullscreen windows when another window gets moved to that workspace (+test) (Thanks rami)
Fixes: #606
2012-01-07 18:18:36 +00:00
Michael Stapelberg 0e1b1dd984 Bugfix: Correctly handle 'move scratchpad' on workspace level (+test) (Thanks mseed)
Fixes: #597
2012-01-07 17:36:30 +00:00
Michael Stapelberg 3254188cda Bugfix: Show scratchpad on the correct output (+test)
Fixes: #596
2012-01-07 16:53:37 +00:00
Michael Stapelberg dee7c07ad2 shmlog: store meta information in the buffer itself, store path as X11 atom
This makes i3-dump-log completely independent of a running i3 instance.
2012-01-06 23:40:07 +00:00
Michael Stapelberg 91499ed2c7 properly serialize floating/scratchpad state when restarting 2012-01-05 21:41:20 +00:00
Michael Stapelberg fca57ed077 Change prototype of handlers to static void, remove a bit of old code 2011-12-30 11:30:56 +01:00
Michael Stapelberg 68544a519e Handle vsnprintf overflows (Thanks Han) 2011-12-30 01:26:36 +01:00
Michael Stapelberg a2031a8894 Log the configfile name in verbose log, not only debug log (Thanks Han) 2011-12-29 00:04:48 +01:00
Michael Stapelberg 8a67f15ef4 add missing scratchpad.{c,h} 2011-12-21 23:17:52 +00:00
Michael Stapelberg 08986a1798 Implement scratchpad functionality (see userguide) 2011-12-21 23:15:32 +00:00
Michael Stapelberg 622b94f176 Merge branch 'master' into next 2011-12-20 18:44:26 +00:00
Michael Stapelberg d963018990 Bugfix: Don’t close workspace when there are still floating windows on it (Thanks noxxun) (+test)
Fixes: #595
2011-12-20 18:44:15 +00:00
Michael Stapelberg 1f2c9306a2 Merge branch 'master' into next
Conflicts:
	testcases/t/159-socketpaths.t
2011-12-18 18:02:08 +00:00
Michael Stapelberg c21172a6f6 Create a secure temp path instead of a predictable one (Thanks Han)
With this commit, i3 will now use either $XDG_RUNTIME_DIR/i3 (XDG_RUNTIME_DIR
is only writable by the user, so this is not a problem) or a secure temporary
location in /tmp, following the pattern /tmp/i3-<user>.XXXXXX
2011-12-18 17:59:31 +00:00
Michael Stapelberg c4298b9311 Merge branch 'master' into next 2011-12-18 17:25:15 +00:00
Michael Stapelberg 4fba2d5f91 Bugfix: Correctly check boundaries and reassign floating windows when moving (Thanks xpt)
Fixes: #592
2011-12-18 17:24:27 +00:00
Fernando Tarlá Cardoso Lemos fbf6d20e05 Fix the signal handler popup text.
Thanks to Michael for the heads-up.
2011-12-18 15:43:00 +00:00
Michael Stapelberg 2ba09f5419 Merge branch 'master' into next 2011-12-18 15:19:09 +00:00
Michael Stapelberg ec28f3b982 Bugfix: Fix floating resize for floating split containers (+test)
Fixes: #588
2011-12-18 15:18:20 +00:00
Michael Stapelberg 4412ccbe5a Merge branch 'master' into next 2011-12-17 22:35:13 +00:00
Michael Stapelberg 7a80d903a5 keygrabbing: only look in the appropriate columns when resolving keysyms
Fixes: #585

This commit fixes the problem of i3 wrongly grabbing/interpreting (!) some key
bindings. Basically, when you have, say, "bindsym Mod1+4 workspace 4", but you
also have "bindsym Mod1+semicolon focus right" (both are default), and your
keyboard layout has semicolon on Mode_switch + 4, the "workspace 4" keybinding
was shadowed by the "focus right" keybinding, because that also resolves to
semicolon.

So, from now on, i3 will only consider column 0 and 1 for normal bindings and
column 2 and 3 for bindings using Mode_switch (columns as seen in xmodmap
-pke).
2011-12-17 22:31:21 +00:00
Michael Stapelberg 76202a824d re-indent translate_keysyms() 2011-12-17 22:28:28 +00:00
Michael Stapelberg 0d210277f0 x: Handle expose-events by only copying the requested region from our pixmap
This is faster than always updating the whole pixmap and should be safe.
2011-12-17 20:08:56 +00:00
Michael Stapelberg 6f8b284586 Merge branch 'master' into next 2011-12-17 18:48:14 +00:00
Michael Stapelberg 664e30903c Bugfix: Don’t change focus after (graphical) resizing 2011-12-17 18:47:29 +00:00
Michael Stapelberg a930994dc9 Merge branch 'master' into next 2011-12-17 17:16:39 +00:00
Michael Stapelberg 75c57c4eef Bugfix: Ignore ConfigureRequests with out-of-bound coordinates (+test)
JDownloader seems to use these for its captcha popups when focus is not on the
same workspace, for some weird reason.
2011-12-17 17:15:52 +00:00
Michael Stapelberg db174234ce Merge branch 'master' into next
Conflicts:
	debian/changelog
2011-12-17 15:28:51 +00:00
Michael Stapelberg 1ff321bc3f Bugfix: Disallow focusing other windows when in fullscreen mode (Thanks aksr)
Fixes: #579
2011-12-17 15:28:17 +00:00
Michael Stapelberg ef224cdb98 Merge branch 'master' into next
Conflicts:
	testcases/t/173-get-marks.t
2011-12-17 14:22:57 +00:00
Michael Stapelberg b46ab649f5 Bugfix: Fix setting the same mark repeatedly on different windows (+test)
Fixes: #582
2011-12-17 14:22:23 +00:00
Michael Stapelberg 5a345db18b Merge branch 'master' into next 2011-12-17 13:55:45 +00:00
Michael Stapelberg 87b6bf7a54 Bugfix: Make resizing work when pressing floating_modifier + right mouse button on window decorations
Fixes: #583
2011-12-17 13:55:16 +00:00
Michael Stapelberg 9e688a2277 Merge branch 'master' into next 2011-12-17 12:21:13 +00:00
Michael Stapelberg f6c0a1e161 Bugfix: Make resizing of tiling windows with floating_modifier use absolute coordinates
Fixes: #580
2011-12-17 12:20:27 +00:00
Michael Stapelberg 9cec9e09ed Merge branch 'master' into next 2011-12-17 11:18:35 +00:00
Michael Stapelberg acb3bdd05e Bugfix: Skip leading whitespace in variable assignments (Thanks ben)
Fixes: #577
2011-12-17 11:16:34 +00:00
Michael Stapelberg 966c654112 implement the GET_LOG_MARKERS IPC request/reply 2011-12-10 11:16:32 +00:00
Michael Stapelberg f7a73f4a68 fix the SHM log size 2011-12-10 11:15:57 +00:00
Michael Stapelberg d034248de0 sighandler: handle all "Core" signals 2011-12-10 11:05:37 +00:00
Michael Stapelberg aa82adb5c0 Introduce --shmlog-size flag, unlink SHM log when exiting 2011-12-10 10:51:55 +00:00
Michael Stapelberg e65ee63763 Implement logging to a SHM ringbuffer
This feature is automatically enabled when running a debug version of i3.
The logfile will use 1% of your physical RAM size, but at max 25 MiB.
2011-12-10 10:50:33 +00:00
Michael Stapelberg 6c112f2a9a Merge branch 'master' into next 2011-11-30 20:34:54 +00:00
Michael Stapelberg d25e77ce75 Don’t set the _NET_WM_WORKAREA hint at all (Thanks cg)
Fixes: #539
2011-11-30 20:33:07 +00:00
Michael Stapelberg fb90a556c8 Merge branch 'master' into next 2011-11-30 20:10:45 +00:00
Michael Stapelberg fb0ad1e8f9 display i3 version in errors, make conversion message an error 2011-11-30 20:09:32 +00:00
Michael Stapelberg 0f9fbcbd25 Merge branch 'master' into next 2011-11-29 22:37:11 +00:00
Michael Stapelberg 626e3efb48 Bugfix: Fix 'resize' command in nested containers (Thanks mseed)
Fixes: #559
2011-11-29 22:36:40 +00:00
Michael Stapelberg f2b73b64be Merge branch 'master' into next 2011-11-29 21:24:05 +00:00
Michael Stapelberg 0e56fcb971 add a few more keywords to make i3 recognize configs as v4 2011-11-29 21:20:42 +00:00
Michael Stapelberg df2236c5ee Merge branch 'master' into next 2011-11-29 20:50:11 +00:00
Michael Stapelberg 59283cce93 Bugfix: Fix resizing for (e.g.) v-split containers in h-split containers
Fixes: #562
2011-11-29 20:48:59 +00:00
Michael Stapelberg 752b101916 Merge branch 'master' into next 2011-11-28 23:28:03 +00:00
Michael Stapelberg bd4b240d56 Bugfix: Ignore EnterNotify events to prevent wrong focus in complex tabbed/stacked layouts (Thanks Phlogistique)
Fixes #560

Finally we have a good explanation and example for why we need to ignore
EnterNotify events which were caused by an Unmap :).
2011-11-28 23:26:45 +00:00
Jan-Erik Rediger f23d675de9 Implement new "i3bar_command" option for bar.
This allows you to specify an alternate path to the i3bar binary.
The userguide docu is included.
2011-11-27 21:40:57 +00:00
Michael Stapelberg 1a3b82eb02 Merge branch 'master' into next 2011-11-26 22:25:06 +00:00
Michael Stapelberg d686f2f873 Bugfix: Don’t create a workspace named "back_and_forth" on startup
Fixes #565
2011-11-26 22:24:30 +00:00
Michael Stapelberg f5dce848b8 Merge branch 'master' into next 2011-11-26 22:18:01 +00:00
Michael Stapelberg 31acb91d90 Bugfix: Fix crash on '[class="i3bar"] focus' (+test) (Thanks f8l)
Fixes #575
2011-11-26 22:17:34 +00:00
Fernando Tarlá Cardoso Lemos 340592a532 Invalidate cached pixmaps on reload and redraw.
After a reload, the drawing parameters for the decorations might
have changed, so we need to invalidate the cache and force a redraw
of the currently visible decorations. Also, don't leak the previous
font when reloading by freeing it before parsing the config.
2011-11-26 21:51:49 +00:00
Michael Stapelberg 67c2c03f76 Merge branch 'master' into next 2011-11-26 21:30:44 +00:00
Michael Stapelberg eeab1f0659 Fix comment for the previous commit 2011-11-26 21:30:26 +00:00
Michael Stapelberg 555dd48f09 Merge branch 'master' into next 2011-11-26 21:19:30 +00:00
Michael Stapelberg 970d11709e Bugfix: Retain absolute window position and size when changing floating borders (Thanks binzter)
Fixes: #561
2011-11-26 21:18:23 +00:00
Michael Stapelberg d805d1bbea Merge branch 'master' into next 2011-11-24 23:50:11 +00:00
Michael Stapelberg 227a58b0c3 Bugfix: Fix startup when RandR is not present 2011-11-24 23:49:35 +00:00
Michael Stapelberg af810df8da Merge branch 'master' into next 2011-11-21 23:10:09 +00:00
Michael Stapelberg 61b8a62132 Bugfix: fix fullscreen with floating windows
Fixes: #564
2011-11-21 23:04:49 +00:00
Michael Stapelberg 561cf3719f little style fixes 2011-11-21 21:48:24 +00:00
Fernando Tarlá Cardoso Lemos 344c04af12 Implement set_font_colors.
This paves the way for other font rendering backends. Fonts and
colors shouldn't be specified manually from now on.
2011-11-21 20:52:32 +00:00
Fernando Tarlá Cardoso Lemos eafc7af606 Make all programs use draw_text. 2011-11-21 20:52:29 +00:00
Fernando Tarlá Cardoso Lemos 5c2088c87e Enhance libi3 and use it in i3bar.
Abstracted draw_text and predict_text_width into libi3. Use
predict_text_width from libi3 in i3 too. This required tracking
xcb_connection in a xcb_connection_t *conn variable that libi3
expects to be available in i3bar.
2011-11-21 20:52:26 +00:00
Michael Stapelberg 70151ea238 Merge branch 'master' into next 2011-11-21 19:56:03 +00:00
Michael Stapelberg 5f8d719835 Bugfix: Skip dock clients when handling FocusIn events (Thanks cradle) 2011-11-21 19:55:41 +00:00
Michael Stapelberg b6e859787e clarify comments about socket activation (Thanks mxf) 2011-11-16 23:14:57 +00:00
Michael Stapelberg 84cf3ec3cb ipc: set CLOEXEC on client file descriptors (Thanks biiter) 2011-11-16 21:42:48 +00:00
Fernando Tarlá Cardoso Lemos fb11cc2d14 Consolidate all convert_* functions into libi3.
Some minor fixes along the way as well. Very minor stuff, unlikely
to ever be visible to the user.
2011-11-16 20:54:30 +00:00
Michael Stapelberg 7498ddd12f ipc: set CLOEXEC on client file descriptors (Thanks biiter) 2011-11-15 23:39:43 +00:00
Michael Stapelberg 1e5cd4b769 Bugfix: Only go to the parent container in resizing if that is actually a split container
(as opposed to a workspace)

This fixes a regression in resizing. We do need testcases for these things.
2011-11-11 19:19:14 +00:00
Michael Stapelberg 60bfc3a600 Bugfix: Correctly handle --no-startup-id with quoted exec commands (Thanks aksr)
Parser changes shortly before a release. What could possibly go wrong.
2011-11-11 00:28:04 +00:00
Michael Stapelberg b808cc5d18 Bugfix: Render floating windows after rendering all outputs (Thanks mw)
Fixes #548

See the comment on why this is necessary.
2011-11-10 20:30:51 +00:00
Michael Stapelberg df095f9d68 Bugfix: Fix tabbed container resizing check (Thanks julien)
Fixes: #534

Turns out that my check was wrong. We actually just need to make sure we are
dealing with the split container.
2011-11-10 19:35:36 +00:00
Michael Stapelberg ed66a30410 mark parameters const 2011-11-10 19:17:36 +00:00
Michael Stapelberg bebd2fceb6 Bugfix: Correctly return to initial state after prev/next/back_and_forth (Thanks Brian)
Fixes: #552
2011-11-10 18:42:24 +00:00
Michael Stapelberg 62f0a9e21d s/1/true 2011-11-10 18:38:29 +00:00
Michael Stapelberg 6bdd12a584 Bugfix: Correctly fill the buffer with zeros 2011-11-09 22:23:33 +00:00
Michael Stapelberg 332dbfe9c1 Enable (unlimited) core dumps when running i3 development versions
Also prints out useful stuff:

    CORE DUMPS: You are running a development version of i3, so coredumps were
    automatically enabled (ulimit -c unlimited).
    CORE DUMPS: Your current working directory is "/home/michael/i3".
    CORE DUMPS: Your core_pattern is: /tmp/%e.core.%p
    i3 (tree) version 4.0.2-479-g26ab2ac (2011-11-08, branch "next") starting

This does not affect child processes of i3.

The intention of this change is to make debugging easier – it’s one less thing
users of the development version have to worry about when trying to help with
debugging.
2011-11-08 22:49:25 +00:00
Michael Stapelberg 26ab2ac008 Bugfix: Insert container at the correct position on workspace-level when workspace_layout == default
Fixes #533

The problem was that the code was always executed. While it *attaches* the new
container to the workspace container, it also sets current = NULL and thus
always appends the container instead of inserting it after the currently
focused child. So now, we just don’t execute that code at all for
workspace_layout == default.
2011-11-08 20:37:24 +00:00
Michael Stapelberg 2a78a5f2b6 ipc: fix memory leaks when clients disconnect 2011-11-07 21:34:39 +00:00
Fernando Tarlá Cardoso Lemos d5613905c8 Plug minor leaks in string conversion routines. 2011-11-07 19:57:11 +00:00
Michael Stapelberg 2b6504d310 Bugfix: RandR: Correctly keep focus on the focused workspace when an output disappears (Thanks AlexanderB, xeen) 2011-10-31 12:11:34 +00:00
Michael Stapelberg 8e3cef33d9 Error out early if there is nothing to move
Fixes: #532
2011-10-27 23:27:33 +01:00
Michael Stapelberg 5227b29b0f Make named workspace assignments work again
Please note that you need a quoted string for the workspace name.
Example:
    workspace "1: www" output HDMI2

Fixes: #456
2011-10-27 22:43:53 +01:00
Michael Stapelberg a4cb4a64d4 Bugfix: warp pointer during the EnterNotify-disabled phase
Following bug:
1) Assign workspace 9 to output HDMI2
2) On HDMI2, be on workspace 1
3) Focus a different output, say LVDS1
4) Execute i3 'workspace 9'
5) Something happens, but you end up back on ws 1

(this is due to an EnterNotify being generated when warping)
2011-10-27 22:29:47 +01:00
Michael Stapelberg df980bffa4 Make 'move' handle floating windows properly
This means you can now specify an amount of pixels for the move command. The
default is 10. Note that this of course only works for floating windows.

Example:
  move left 20 px
2011-10-27 21:46:15 +01:00
Michael Stapelberg e25991f538 Bugfix: Don’t invoke resizing when clicking on the decoration in a > 1 child split con (Thanks julien)
Fixes: #534
2011-10-27 20:36:55 +01:00
Michael Stapelberg af1871e414 Bugfix: Only fallback on the font if it’s actually set (Thanks phnom) 2011-10-26 21:21:55 +01:00
Michael Stapelberg ee804a0635 Also call workspace_show() when moving cursor to an empty output (Thanks mw) 2011-10-25 23:41:52 +01:00
Michael Stapelberg 38447c4b47 Bugfix: Correctly use workspace_show() when focus changes to a different output via EnterNotify or FocusIn (Thanks pnutzh4x0r)
This makes i3bar show the correct workspace when you move your mouse from one
output to another.
2011-10-25 23:04:10 +01:00
Michael Stapelberg e710477a07 Bugfix: properly handle comments in colors {} blocks of bar config (+test) (Thanks fernandotcl) 2011-10-25 22:31:57 +01:00
Michael Stapelberg bbfbd28dfa Add a --no-startup-id flag for exec (command), exec (config), exec_always (config) 2011-10-25 22:18:17 +01:00
Michael Stapelberg 726f2a1e5a normalize file headers across **/*.{h,c} 2011-10-25 21:19:38 +01:00
Michael Stapelberg 8660ae4e12 bar config: fall back to the i3 font (Thanks pl) 2011-10-25 20:50:57 +01:00
Fernando Tarlá Cardoso Lemos d490bae8a2 Close empty workspaces if they're not visible.
Previously, we'd only close an empty workspace when we moved away
from it. Now we also close it when the last client exits, as long
as that workspace is not visible anymore.
2011-10-24 00:12:14 +01:00
Michael Stapelberg a58018cf66 Add libi3/load_font, use it everywhere
…except for i3bar, which needs slightly more information about the font
2011-10-23 22:37:11 +01:00
Michael Stapelberg 6d01d37b03 remove unused cached_fonts TAILQ 2011-10-23 22:03:20 +01:00
Michael Stapelberg 8da6049ca9 Actually make load_font only fallback if 'fallback' is true 2011-10-23 22:02:11 +01:00
Michael Stapelberg 3e7f941b83 Fix comment in run_assignments (Thanks xeen) 2011-10-23 21:45:12 +01:00
Michael Stapelberg 91134f75c0 Move get_mod_mask to libi3, use it in i3 and i3-config-wizard
Also, the API changed a bit. There are two functions now, both assume you
already got the keysyms (which is the case for i3 and i3-config-wizard),
one gets the modifier mapping for you (aio_get_mod_mask_for) while the other
assumes you also got that. No roundtrips are required for the latter.
2011-10-23 21:26:15 +01:00
Michael Stapelberg a512b99a51 Introduce --get_socketpath and --force_xinerama as synonyms for --get-socketpath and --force-xinerama 2011-10-23 19:41:40 +01:00
Michael Stapelberg 6dc6ba11fc Eliminate xcb_change_gc_single everywhere with C99 2011-10-23 18:06:25 +01:00
Michael Stapelberg 9eda7fb6fb move strndup to libi3 2011-10-23 18:02:01 +01:00
Michael Stapelberg ada4857ad2 Fix colors in i3bar (Thanks julien)
i3bar previously used get_colorpixel on strings without the leading # (ff0000
instead of #ff0000). Since it uses libi3’s get_colorpixel now we needed to
update a few places.
2011-10-23 17:48:44 +01:00
Michael Stapelberg cb9bbcfccf Move get_colorpixel to libi3, use it everywhere else 2011-10-23 17:38:21 +01:00
Michael Stapelberg 31cb3dda8d cfgparse: use different literal strings for ambiguous keywords in bar context 2011-10-23 16:41:23 +01:00
Michael Stapelberg 9d15a00ba8 introduce sasprintf() in libi3, use it everywhere 2011-10-23 13:16:56 +01:00
Michael Stapelberg 10d3281b0f remove/shorten a lot of debugging messages
Some of them are useless nowadays, others very unlikely to be a problem.
Those which might still be interesting somewhen in the future are just
commented out.
2011-10-23 00:15:13 +01:00
Michael Stapelberg 42d355f2b7 normalize modelines/headers across src/*.c 2011-10-22 23:40:02 +01:00
Michael Stapelberg 753d67fb64 migration from exec i3bar to bar config: i3 substitutes exec with a bar block, shows nagbar 2011-10-22 16:33:00 +01:00
Michael Stapelberg 9b84348201 Bugfix: fix off by one when copying the hex colorcode (Thanks fernandotcl) 2011-10-21 23:22:48 +01:00
Michael Stapelberg 77961ad9c8 cfgparse: Don’t use asprintf when parsing hex colors 2011-10-21 23:09:57 +01:00
Michael Stapelberg 3baeeb1834 Bugfix: properly transition in and out of the COLOR_COND state (Thanks fernandotcl) 2011-10-21 22:58:53 +01:00
Michael Stapelberg caee0a0fda cfgparse: eliminate absolute states, use yy_push_state/yy_pop_state
This fixes a problem with workspace assignments.
I tested i3 -C with three user configs (Thanks SardemFF7, julien, xeen)
and did not notice any problems.
2011-10-20 22:38:46 +01:00
Michael Stapelberg 12d866e4f6 Don’t start i3-nagbar when using -C to validate the config 2011-10-20 22:25:59 +01:00
Michael Stapelberg 230b238870 Actually start i3bar instances for each configured bar 2011-10-20 19:03:40 +01:00
Michael Stapelberg ad0f13a0a9 Clean bars before reloading the config (+test)
While the configuration gets updated in i3, the i3bar processes will not pick
up these changes. We have to think about a good way to do that.
2011-10-20 18:47:09 +01:00
Michael Stapelberg 15bface10d Create different IDs for each bar (+test) 2011-10-19 19:57:39 +01:00
Michael Stapelberg 063b124e35 Implement parsing bar {} config blocks 2011-10-18 22:16:04 +01:00
Michael Stapelberg 149b05aacf ipc: when requesting the bar config without a payload, return an array of available bar IDs 2011-10-18 22:12:46 +01:00
Michael Stapelberg e3cbdea1fc Bugfix: Correctly close the colors map in the IPC bar config reply 2011-10-18 22:11:44 +01:00
Michael Stapelberg c2c6ca25d5 Make the barconfig list a TAILQ 2011-10-18 22:11:27 +01:00
Michael Stapelberg 24ede1c834 add an IPC request to get the bar configuration (by ID) 2011-10-18 19:05:49 +01:00
Michael Stapelberg 4898f78e5e add a data structure for 'bar' configuration 2011-10-18 19:05:49 +01:00
Peter Bui 9d67ae2202 Focus new window only if it is on a visible workspace on the current focused output. 2011-10-18 18:56:39 +01:00
Michael Stapelberg a506e59b3c Bugfix: Fix segfault when starting i3 (Thanks pnutzh4x0r) 2011-10-18 18:47:07 +01:00
Michael Stapelberg f09d9a4c37 log: use localtime_r instead of localtime
localtime_r does not have the side-effect of behaving like it called tzset(),
in particular it will save one stat(/etc/localtime) syscall. This is not a big
deal, but it makes the strace output cleaner and thus more useful :).
2011-10-18 18:32:47 +01:00
Michael Stapelberg 178be03fa6 Implement 'workspace back_and_forth' (Patch by Michael Walle) 2011-10-17 23:17:56 +01:00
Michael Stapelberg 914ca6cfe7 Bugfix: Use _exit in forking to avoid calling the libev cleanup handler (Thanks xeen) 2011-10-15 16:56:47 +01:00
Michael Stapelberg 32b97745ec Don’t call ev_destroy_loop with ev < 4 in atexit (Thanks xeen) 2011-10-15 16:56:32 +01:00
Michael Stapelberg 5f52c78aa0 Change the root window cursor to 'watch' during startups 2011-10-10 15:54:18 +01:00
Michael Stapelberg 2ad4fbb34a startup: delete the startup sequence upon completion, make the timeout complete it 2011-10-10 15:54:18 +01:00
Michael Stapelberg 997a539a8a Implement timeouts for startup notifications 2011-10-10 15:54:17 +01:00
Michael Stapelberg 6ac098a45e support _NET_STARTUP_ID on the client leader window
(necessary for GIMP, geeqie, …)
2011-10-10 15:54:17 +01:00
Michael Stapelberg 4204b8e2b0 Get the _NET_STARTUP_ID in manage_window, get the corresponding workspace 2011-10-10 15:54:17 +01:00
Michael Stapelberg 499d89bdb0 Keep track of startup notifications in a TAILQ, save workspace 2011-10-10 15:54:17 +01:00
Michael Stapelberg f4f4d782bb implement a startup monitor, move code to src/startup.c 2011-10-10 15:54:17 +01:00
Michael Stapelberg c812cdcf9a make handle_client_message not return anything
The function returned an int for historical reasons.
2011-10-10 15:54:17 +01:00
Michael Stapelberg d1d4f39f9e save the last timestamp received by X11 in last_timestamp
We need it for startup notifications (to generate a unique id)

Conflicts:

	include/i3.h
	src/main.c
2011-10-10 15:54:17 +01:00
Michael Stapelberg b9db72dc8a Implement support for startup notifications
This only sets up startup notifications for the 'exec' commands and directives.

Monitoring startups follows later.
2011-10-10 15:54:17 +01:00
Michael Stapelberg 2a29d9c2c1 Make conn_screen available outside of main()
Will be used in other parts of the code for startup notification
2011-10-10 15:54:17 +01:00
Michael Stapelberg 0f74f9b921 remove left-over type definition for mode_info 2011-10-09 18:25:21 +01:00
Michael Stapelberg 18991a65c7 log WM_NAME (non-utf-8 window titles) 2011-10-09 14:45:34 +01:00
Michael Stapelberg 29c185dd0b Move fake_configure_notify to libi3 2011-10-09 13:40:15 +01:00
Michael Stapelberg 658bf5adff Bugfix: Warp pointer to the correct window when using the 'focus' command
Comment in the code makes the fix clear, I think.

Steps to reproduce the issue:
1) On the right monitor, open two terminals (h-split workspace)
2) 'i3 mark foo' on the right terminal
3) Focus the left terminal
4) Switch to the left monitor
5) i3 '[con_mark="foo"] focus'
6) the left window will contain the pointer (and is focused for a short period
   of time, or even permanently due to race conditions)
2011-10-03 21:54:36 +01:00
Noe Rubinstein 1eab86b916 add "move workspace next" and "move workspace prev"
some factorization would be better here, however I don't really know my
way around bison
2011-10-02 22:03:47 +01:00
Michael Stapelberg b2ad9a77c8 rename the internal function to _workspace_show, add a comment to workspace_show_by_name 2011-10-02 22:03:16 +01:00
Noe Rubinstein 92cc4494aa refactor workspace_show and friends 2011-10-02 21:57:00 +01:00
Michael Stapelberg b755397687 Make i3 send arguments as command to a running i3 instance (like i3-msg)
From i3 --help:

If you pass plain text arguments, i3 will interpret them as a command
to send to a currently running i3 (like i3-msg). This allows you to
use nice and logical commands, such as:

	i3 border none
	i3 floating toggle
	i3 kill window
2011-10-02 19:20:43 +01:00
Michael Stapelberg 4243a4053e Cleanup i3 --help 2011-10-02 18:55:15 +01:00
Michael Stapelberg 046cf99585 Move ipc_send_message and ipc_recv_message to libi3
Make i3-msg and src/ipc.c use it
2011-10-02 18:33:36 +01:00
Michael Stapelberg 501dc36b98 move sstrdup, scalloc, smalloc, srealloc to libi3, improve error messages 2011-10-02 18:09:30 +01:00
Michael Stapelberg 23796ea900 Implement i3 --get-socketpath, useful for IPC scripts
In order to not depend on X11 just for getting the socket paths, scripts or
other programs can now use i3 --get-socketpath. Since i3 must be present on the
computer anyways, this saves one dependency :).
2011-10-02 16:12:10 +01:00
Michael Stapelberg 679bceccc4 remove obsolete comment 2011-10-02 13:18:12 +01:00
Michael Stapelberg 0482dc7546 Merge branch 'master' into next 2011-10-01 17:44:46 +01:00
Michael Walle 8adcf3e5d1 set close-on-exec flag on errorlogfile
Make sure the file descriptor is closed within the child after forking.

Signed-off-by: Michael Walle <michael@walle.cc>
2011-10-01 17:44:22 +01:00
Michael Stapelberg 3629934b0a Check for PCRE version and disable PCRE_UCP for <= 8.10 2011-09-30 20:31:32 +01:00
Michael Stapelberg db33da2258 Merge branch 'master' into next 2011-09-26 20:12:07 +01:00
Michael Stapelberg abaa8c2356 Bugfix: IPC: Correctly dump the 'focus' array 2011-09-26 20:11:47 +01:00
Michael Stapelberg 6420b2b102 Introduce the i3-sensible-{pager,editor,terminal} scripts
The former two provide fallbacks in case $PAGER or $EDITOR is not set (which
might be more common than you think, because they have to be set in
~/.xsession, not in the shell configuration!) while the latter tries to launch
a terminal emulator. The scripts are most prominently used in i3-nagbar, which
alerts the user when the configuration is broken for some reason. Also,
i3-sensible-terminal is used in the default configuration.

This commit does not rely on the shell supporting ${PAGER:-less} anymore, which
is not the case for 'fish'.
2011-09-25 18:46:37 +01:00
Michael Stapelberg 1481cd95c9 Implement the I3_SYNC client protocol
This is mainly useful for the testsuite. The tests can wait until i3 processed
all X11 events and then continue. This eliminates sleep() calls which leads to
a more robust and faster testsuite.
2011-09-22 23:13:12 +01:00
Michael Stapelberg daebe28b09 Merge branch 'master' into next 2011-09-22 23:11:14 +01:00
Yves Fischer 0c367f9e4c Skip dragging of floating cons in fullscreen mode 2011-09-22 23:10:48 +01:00
Michael Stapelberg 1717b88174 Merge branch 'master' into next 2011-09-22 20:11:44 +01:00
Michael Stapelberg 4dbda73114 Bugfix: Correctly revert focus to other floating windows when closing a floating window
Uncovered by the testsuite \o/
2011-09-22 20:10:51 +01:00
Michael Stapelberg 143663f031 Merge branch 'master' into next 2011-09-20 22:37:08 +01:00
Michael Stapelberg 77ae3cd8f7 Bugfix: use bufcopy instead of buf when boundary checking (Thanks thomasba)
Also replace the useless (bufcopy + (next - bufcopy)) with next
2011-09-20 22:36:23 +01:00
Michael Stapelberg de7c2841ed Merge branch 'master' into next 2011-09-20 21:42:51 +01:00
Michael Stapelberg cd6c3fedcb A bit more boundary-checking when replacing variables.
Makes valgrind happy
2011-09-20 21:42:26 +01:00
Michael Stapelberg e1949aa694 Bugfix: Correctly split key/value when parsing variables (Thanks xeen) 2011-09-20 21:42:09 +01:00
Michael Walle 5aa43d61f8 Add force_xinerama configuration option
The configuration option does the same as the commandline parameter, except
it can be easily set by the user (e.g. you are using KDM and can't start a
session through ~/.xsession).

Signed-off-by: Michael Walle <michael@walle.cc>
2011-09-19 23:10:38 +01:00
Michael Stapelberg 05c0a8985b Merge branch 'master' into next 2011-09-18 17:44:00 +01:00
Michael Stapelberg 2fe0949abd Bugfix: Only change focus in tree_close() when the container was focused before
Fixes: #441

I’m not sure if that’s really all there is to it. Seems a bit too simple :).
We’ll see if I missed some corner cases in the next few days…
2011-09-18 17:43:02 +01:00
Michael Stapelberg 46409ad656 Merge branch 'master' into next 2011-09-18 17:02:52 +01:00
Michael Stapelberg a82f5750de Bugfix: Avoid out of bounds coordinates when moving floating windows (Thanks eeemsi)
This commit makes the coordinates proportional when moving floating windows.
That is, if you have a window at the bottom of your 1920 px monitor and move it
to your 800 px monitor, it will be at the bottom of the 800 px monitor (and not
out of bounds).
2011-09-18 17:00:29 +01:00
Michael Stapelberg b3adaa2983 Implement the window_role criterion (checks WM_WINDOW_ROLE)
Closes: #446

This is handy for matching specific windows of a multi-window application, for
example only Pidgin’s buddy list window.
2011-09-18 16:05:10 +01:00
Michael Stapelberg c88425147e Merge branch 'master' into next 2011-09-18 14:39:33 +01:00
Michael Stapelberg 7a2e92a116 Bugfix: Use con_orientation(). Fixes switching between different outputs
Fixes: #518

For stacking containers, direct access using con->orientation is wrong, we need
to use con_orientation().
2011-09-18 14:38:39 +01:00
Michael Stapelberg 0bc44ffc37 Merge branch 'master' into next 2011-09-18 00:40:42 +01:00
Peter Bui a5012f6021 fix-bug-515: always adjust floating position when moving to another output
Floating con position needs to be adjusted when moving to another
output, regardless of whether or not the target workspace is visible.
2011-09-18 00:38:32 +01:00
Michael Stapelberg b4ab4703c9 Merge branch 'master' into next 2011-09-17 20:55:13 +01:00
Michael Stapelberg 755c618cd4 Bugfix: Don’t warp the pointer if it already is on the target output (Thanks cls, pnutzh4x0r)
My testcase was putting a floating window on the left output, but overlapping a
little to the right output. Then switch to a workspace on the right output.
2011-09-17 20:53:24 +01:00
Michael Stapelberg e6a854a742 Remove obsolete code for floating focus 2011-09-17 19:29:06 +01:00
Michael Stapelberg 172f3563f7 Implement focus switching (focus left/right) for floating windows
Fixes: #475
2011-09-17 19:28:41 +01:00
Michael Stapelberg fe35c80741 Also make compilation possible on systems with libev 3
From the source:

    We need ev >= 4 for the following code. Since it is not *that* important
    (it only makes sure that there are no i3-nagbar instances left behind) we
    still support old systems with libev 3.
2011-09-17 17:55:36 +01:00
Michael Stapelberg 7a38d8ac56 Merge branch 'master' into next 2011-09-17 14:13:05 +01:00
Michael Stapelberg deab3ac338 Send the correct X11 border_width in faked ConfigureNotifys 2011-09-17 14:11:55 +01:00
Michael Stapelberg f2f636f9e7 Bugfix: Honor the X11 window border in ConfigureRequests 2011-09-17 14:11:01 +01:00
Michael Stapelberg 983a679537 Bugfix: Honor the X11 window border when calculating dimensions for floating windows 2011-09-17 14:10:35 +01:00
Michael Stapelberg f6eaa8a580 Bugfix: Don’t use top border height twice when calculating dimensions for floating windows 2011-09-17 14:09:57 +01:00
Michael Stapelberg 5a85c9efd2 fix build in 'next' (Thanks thomasba) 2011-09-14 23:16:23 +01:00
Michael Stapelberg ad568aa8c1 Merge branch 'master' into next 2011-09-14 23:00:02 +01:00
Michael Stapelberg b1aa8107b3 Bugfix: Correctly handle ConfigureRequests for floating windows in multi-monitor setups (Thanks thomasba)
Fixes #519
2011-09-14 22:59:19 +01:00
Michael Stapelberg 6b541d382b Bugfix: Don’t fix floating coordinates when reassigning (fixes flickering)
This fixes flickering when moving floating windows between different monitors.
2011-09-14 22:58:51 +01:00
Michael Stapelberg dc790cfa32 Bugfix: Correctly free old assignments when reloading
Fixes #516
2011-09-11 23:41:46 +01:00
Michael Stapelberg f3716e45cf re-indent load_configuration() 2011-09-11 23:31:06 +01:00
Michael Stapelberg 2c7148c46e Same bugfix as 2a215fd, but for assignments with invalid criteria 2011-09-11 22:54:41 +01:00
Michael Stapelberg 717ae819c5 Merge branch 'master' into next 2011-09-11 22:52:44 +01:00
Michael Stapelberg 2a215fd7e2 Bugfix: Ignore for_window commands with empty (invalid) criteria (+test) (Thanks aksr) 2011-09-11 22:52:33 +01:00
Michael Stapelberg a41bfba47a finally remove the deprecated 'screen' keyword from cfgparse.l 2011-09-11 22:27:31 +01:00
Michael Stapelberg d82698efa7 make the old assign syntax trigger an i3-nagbar warning (it’s deprecated), adjust test 2011-09-11 22:01:36 +01:00
Michael Stapelberg e47e100819 Introduce a new syntax for the 'assign' command:
Instead of using a quoted string to specify the class / title, the assign
command now uses criteria, just like the for_window command or the command
scopes.

An example comes here:

    # Assign all Chromium windows (including popups) to workspace 1: www
    assign [class="^Chromium$"] → 1: www

    # Make the main browser window borderless
    for_window [class="^Chromium$" title=" - Chromium$"] border none

This gives you more control over the matching process due to various reasons:

1) Criteria work case-sensitive by default. Use the (?i) option if you want a
   case-insensitive match, like this:
   assign [class="(?i)^ChroMIUM$"] → 1

2) class and instance of WM_CLASS can now be matched separately. For example,
   when starting urxvt -name irssi, xprop will report this:
   WM_CLASS(STRING) = "irssi", "URxvt"
   The first part of this is the instance ("irssi"), the second part is the
   class ("URxvt").
   An appropriate assignment looks like this:
   assign [class="^URxvt$" instance="irssi"] → 2

3) You can now freely use a forward slash (/) in all strings since that is no
   longer used to separate class from title (in-band signaling is bad, mhkay?).
2011-09-11 21:54:13 +01:00
Michael Stapelberg d03dffe012 Kill left-over i3-nagbar processes on 'exit' 2011-09-11 21:49:35 +01:00
Michael Stapelberg b3e1fb1f3b Make the old 'assign' case-insensitive again (+test) (Thanks aksr) 2011-09-11 21:16:45 +01:00
Michael Stapelberg c1c1730516 pcre: enable UCP, UTF-8 (if available), extend t/19-match 2011-09-11 11:40:51 +01:00
Michael Stapelberg 2fc54aadf1 Implement support for PCRE regular expressions for all criteria (for_window, commands, assignments) 2011-09-10 23:53:11 +01:00
Michael Stapelberg 77ae771476 Restrict 'resize' command to left/right for horizontal cons, up/down for vertical cons
This makes the interface much clearer and avoids confusion about which key to
press in which situation.
2011-09-05 22:36:04 +02:00
Michael Stapelberg 8928b5f55d Bugfix: Correctly handle workspace names which do not start with a zero 2011-09-05 22:21:10 +02:00
Michael Stapelberg b4809e9ba7 Merge branch 'master' into next 2011-08-31 14:45:14 +02:00
Michael Stapelberg e1631d6320 properly free memory/close fd upon errors (Thanks xeen)
Found with the static analyzer cppcheck
2011-08-31 14:44:48 +02:00
Michael Stapelberg dfda878272 Bugfix: Correctly assign a number to workspaces starting with '0: ' (Thanks SardemFF7) 2011-08-28 18:17:02 +02:00
Michael Stapelberg 57e7266da4 Merge branch 'master' into next 2011-08-28 17:41:23 +02:00
Peter Bui 6e59d693d2 Use name_json if available, rather than non-descriptive name. 2011-08-28 17:36:16 +02:00
Michael Stapelberg 16188af8bf Merge branch 'master' into next 2011-08-28 15:47:35 +02:00
Michael Stapelberg 5618875df8 Bugfix: Make 'floating enable' check for dock windows (Thanks edelkind)
Fixes #501
2011-08-28 15:46:50 +02:00
Michael Stapelberg 8114ecda47 Merge branch 'master' into next 2011-08-27 13:47:57 +02:00
Michael Stapelberg e97a7e34f7 Bugfix: Re-implement reconfiguring height of dock windows (+test) (Thanks thomasba) 2011-08-27 13:47:10 +02:00
Michael Stapelberg 6c42a179ec Merge branch 'master' into next 2011-08-27 13:03:20 +02:00
Michael Stapelberg 4c01dbd726 Bugfix: Don’t always focus floating windows (fixes focus stealing with assignments) (+test) (Thanks aksr) 2011-08-27 13:02:44 +02:00
stfn 8e8b9b93f4 ipc.c: Fix warning 2011-08-26 23:33:11 +02:00
Michael Stapelberg 7d2978ead4 Merge branch 'master' into next 2011-08-26 19:18:16 +02:00
Michael Stapelberg f53f954a33 Bugfix: Re-enable X11 Eventmask *after* pushing all the X11 changes
This should fix focus problems where EnterNotify events were generated while
moving windows. Hopefully it does not trigger any regressions :).

Fixes #500
2011-08-26 19:17:52 +02:00
Michael Stapelberg afff328c59 Merge branch 'master' into next 2011-08-26 12:37:04 +02:00
Michael Stapelberg 12e15609ef Bugfix: Correctly recognize duplicate workspace assignments (Thanks Moredread)
Example of a faulty config:

    workspace 5 VGA1
    workspace 5 LVDS1

Fixes #498, #499
2011-08-26 12:35:42 +02:00
Michael Stapelberg 53a9ace3a6 Merge branch 'master' into next 2011-08-26 03:24:14 +02:00
Michael Stapelberg 7bf465af9f Fix prototype of con_inside_focused 2011-08-26 03:23:57 +02:00
Michael Stapelberg a57a2b9ccb Merge branch 'master' into next 2011-08-26 03:18:16 +02:00
Michael Stapelberg 7fca7f029f Correctly render containers when a split container is focused 2011-08-26 03:17:41 +02:00
Michael Stapelberg 6d91a6248e Merge branch 'master' into next 2011-08-26 02:02:50 +02:00
Michael Stapelberg 7741608a9d Bugfix: Only consider tiling windows when attaching tiling windows to workspaces (Thanks Tucos)
Fixes #436
2011-08-26 02:01:06 +02:00
Michael Stapelberg 4984b81282 Merge branch 'master' into next 2011-08-25 21:59:19 +02:00
Michael Stapelberg f06059ec94 Bugfix: Accept '\t' in the 'set' command, don’t die but ELOG in case of errors (Thanks atsutane) 2011-08-25 21:58:03 +02:00
Michael Stapelberg 4fcca74e2b Merge branch 'master' into next 2011-08-25 00:24:12 +02:00
Michael Stapelberg 4f22e12c5c Bugfix: Correctly render non-leaf containers (Thanks eeemsi, mseed)
Fixes #465
2011-08-25 00:23:33 +02:00
Michael Stapelberg 2acbf4d4a4 Compilation fix: Add dont_warp=false 2011-08-24 23:06:49 +02:00
Michael Stapelberg 75c11cb894 Merge branch 'master' into next 2011-08-24 23:00:12 +02:00
Michael Stapelberg 698d97cd02 Bugfix: Correctly warp floating windows when using the 'move' command 2011-08-24 22:59:46 +02:00
Michael Stapelberg cd2d7ef484 Bugfix: Correctly keep focus when moving non-leaf windows 2011-08-24 22:55:56 +02:00
Michael Stapelberg 1d9a2abc05 Bugfix: Fix coordinates when moving a floating window to a different output 2011-08-24 22:54:10 +02:00
Michael Stapelberg 37a40671c9 Merge branch 'master' into next 2011-08-24 22:43:31 +02:00
Michael Stapelberg 62e9eab4e5 Merge branch 'master' into next
Conflicts:
	src/floating.c
2011-08-24 22:43:15 +02:00
Michael Stapelberg 7558c1ddbd Bugfix: Correctly handle current_output == NULL
Fixes t/66-assign.t
2011-08-24 22:41:17 +02:00
Peter Bui a33bfa81d2 Move centering code to before sanity check 2011-08-24 22:27:15 +02:00
Michael Stapelberg c527497a4b Merge branch 'master' into next 2011-08-24 16:58:47 +02:00
Michael Stapelberg 247e115835 Bugfix: Correctly place floating windows on their appropriate output (Thanks kraM)
Fixes #452

This might also fix problems with Firefox where Firefox only displays a white
window (my guess is that it mapped a floating window outside of the actually
visible area for some reason).
2011-08-24 16:57:35 +02:00
Michael Stapelberg ff85023b08 Merge branch 'master' into next 2011-08-24 15:14:53 +02:00
Michael Stapelberg 0d35feb71b Bugfix: Make the 'resize' command work inside tabbed/stacked cons (+test) (Thanks sbedivere)
Fixes #461
2011-08-24 15:14:04 +02:00
Michael Stapelberg 642a745004 Merge branch 'master' into next 2011-08-24 00:57:36 +02:00
Michael Stapelberg 0848844f2d Bugfix: Fix 'focus mode_toggle' on an empty workspace (Thanks BeF)
Fixes #487
2011-08-24 00:55:11 +02:00
Michael Stapelberg 2cd8231fce Merge branch 'master' into next 2011-08-20 17:48:49 +02:00
Michael Stapelberg f15559eb1f Don’t die, but ELOG and fallback when the pointer cannot be queried (Thanks Niklas) 2011-08-20 17:48:07 +02:00
Michael Stapelberg 22e30061f3 Merge branch 'master' into next 2011-08-17 16:37:09 +02:00
Michael Stapelberg f172359ba5 Bugfix: Don’t change focus when assigned windows start on invisible workspaces (+test) (Thanks ioflag)
Fixes #468
2011-08-17 16:36:19 +02:00
Michael Stapelberg ec317e78c1 use 'break' instead of 'return', the generated code will end up in a switch statement 2011-08-17 16:12:48 +02:00
Peter Bui 7ddba4995f BUG-396: Implement move output <RANDR-OUTPUT> command
Also add support for move output <up|down|left|right> and update
userguide about the new command.
2011-08-17 16:10:11 +02:00
Michael Stapelberg 4cf2cab626 Merge branch 'master' into next 2011-08-17 13:37:33 +02:00
Michael Stapelberg 09ad9808f6 Bugfix: Set focus to where the mouse pointer is when starting (Thanks nutron)
Fixes #477
2011-08-17 13:37:08 +02:00
Michael Stapelberg 2eab8d7f20 Merge branch 'master' into next 2011-08-17 12:29:15 +02:00
Michael Stapelberg 7c6f693c8a Bugfix: Don’t consider the workspace next/prev command when looking for named workspaces
Fixes #469
2011-08-17 12:28:45 +02:00
Michael Stapelberg 7eacf8dd04 Merge branch 'master' into next 2011-08-17 12:17:29 +02:00
Michael Stapelberg 22882f4e89 Bugfix: Initialize verbose to 'false' (Thanks tilman)
Verbosity was set to 'true' when we started the tree branch.
We forgot to set it back to 'false' :-).
2011-08-17 12:16:32 +02:00
Michael Stapelberg 7a22bd1cf3 Merge branch 'master' into next 2011-08-17 12:14:17 +02:00
Peter Bui 36224f86d1 Only warp pointer once during x_push_changes()
- Introduce warp_to static variable in x.c that stores the coordinates
  to warp to as a Rect.

- Add x_set_warp_to function to set this variable.  Use in _tree_next,
  workspace_show, and con_move_to_workspace.

- In x_push_chanages, if warp_to is set, then call xcb_warp_pointer_rect
  and then reset it to NULL.

This fixes all know bugs for pointer warping for me.
2011-08-17 12:12:40 +02:00
Michael Stapelberg 2abe23d6ff Merge branch 'master' into next 2011-08-17 01:52:45 +02:00
Michael Stapelberg 7951445849 xcb: use predefined XCB_ATOM_ atoms, don’t request them 2011-08-17 01:41:19 +02:00
Michael Stapelberg d3efa73dd7 Merge branch 'master' into next 2011-08-11 22:22:44 +02:00
Valentin Voigt bf0c67b2af Warp cursor when changing workspace. 2011-08-11 22:13:50 +02:00
Michael Stapelberg 3af7692a92 Merge branch 'tests-optimize' into next 2011-08-10 15:57:28 +02:00
Michael Stapelberg 10f871b57b implement "socket activation": passing IPC sockets to i3 2011-08-10 15:55:27 +02:00
Michael Stapelberg 016ecb65fb Merge branch 'master' into next 2011-08-09 10:02:55 +02:00
Peter Bui d8cf36ce83 Fix two focus issues when switching/moving workspaces
1. Fix focus when moving to same workspace.

If we have a single window on a workspace and we switch to the same
worksapce, focus_next will be the workspace container, rather than the
current window, so simply call con_descend_focused to ensure we set the
focus to a window.

2. Fix focus when moving a container to a visible workspace.

Call workspace_show before we attaching to new visible workspace, so we
don't get in the weird situation where target workspace has focused
window, but it isn't considered focused.
2011-08-09 10:01:08 +02:00
Mateusz Poszwa 42db9de7ec Add new_float config option.
This option sets the default border style for containers automatically put into floating mode.

Fixes #264
2011-08-09 09:29:53 +02:00
Mateusz Poszwa cd5ebc2dca src/manage.c: properly set automatic flag when calling floating_enable() 2011-08-09 09:29:47 +02:00
Michael Stapelberg eb0a56fad1 Merge branch 'get-marks' into next 2011-08-09 09:28:06 +02:00
Michael Stapelberg 4253aa4ba2 Merge branch 'master' into next 2011-08-09 09:27:55 +02:00
Michael Stapelberg cd1add1f3c Bugfix: don’t free the old json_output, the caller does that 2011-08-09 09:27:28 +02:00
Michael Stapelberg 95416175cd Bugfix: use FREE to correctly handle NULL replies 2011-08-09 09:27:24 +02:00
Peter Bui 5e06b1b21d Fix some potential memory leaks 2011-08-09 09:27:15 +02:00
Helgi Kristvin Sigurbjarnarson 3cc22dcbe4 Preserve marks between restarts. 2011-08-09 08:19:31 +02:00
Helgi Kristvin Sigurbjarnarson 35d7ef0ddd Feature: implement GET_MARKS 2011-08-09 08:04:33 +02:00
Michael Stapelberg e304902874 Merge branch 'master' into next 2011-08-07 20:45:20 +02:00
Michael Stapelberg 6fb5d6e313 initialize most to NULL, fixes warning 2011-08-07 20:45:06 +02:00
Michael Stapelberg 9260cd7e12 Merge branch 'master' into next 2011-08-07 17:56:37 +02:00
Michael Stapelberg d39261a1f0 rewrite con_descend_orientation
It now uses the container orientation (if it is appropriate, the last focused
one otherwise) to recurse. This works better if the target workspace is in
vertical orientation when you use right/left or if it is in horizontal
orientation but you use up/down.
2011-08-07 15:57:36 +02:00
Michael Stapelberg 99ba193ce7 Bugfix: the up/down directions were swapped
Also compare 'output' and 'current' in the same order in both parts of the
condition to make the comparison more clear.
2011-08-07 15:46:24 +02:00
Michael Stapelberg 692d65b0fd little style fixes 2011-08-07 15:24:51 +02:00
Peter Bui a547365a88 Implement switching focus across screens.
Modify _tree_next() so that when we reach the workspace container:

1. Find the next corresponding output (screen) using the added
get_output_next().

2. If there is another output, find the visible workspace.

3. Call workspace_show on found workspace.

4. Find the appropriate window to focus (leftmost/rightmost, etc.) using
con_descend_direction, and then focus it.

I've only tested on horizontal monitors (left/right).
2011-08-07 14:33:07 +02:00
Michael Stapelberg 94ba655794 Merge branch 'master' into next 2011-08-06 18:54:50 +02:00
Michael Stapelberg cd5e74bd8e Bugfix: Call tree_render() before starting the dragging when dragging a floating window (Thanks eeemsi)
Fixes #462
2011-08-06 18:53:39 +02:00
Michael Stapelberg 2631ad4c07 Merge branch 'master' into next 2011-08-05 01:04:28 +02:00
Michael Stapelberg ec0d67410a Fix border rendering (Thanks Paride Legovini) 2011-08-05 01:03:56 +02:00
Michael Stapelberg 6e95004d6c Merge branch 'master' into next 2011-08-04 23:37:40 +02:00
Michael Stapelberg f2e1e220a4 Bugfix: Use the right format string (Thanks pnutzh4x0r) 2011-08-04 23:34:23 +02:00
Michael Stapelberg 7e0cbf18f9 Bugfix: Correctly parse the 'focused' (it’s a bool, no longer int) when restoring layout (Thanks andi) 2011-08-04 22:58:19 +02:00
Michael Stapelberg 93c3596619 Merge branch 'master' into next 2011-08-04 22:21:42 +02:00
Michael Stapelberg 1d50cff7ca Bugfix: Fix stacking order
The commit 192dbdabd6 introduced a regression
here (open three floating windows and try to raise them with clicking to see
what i mean)
2011-08-04 22:19:30 +02:00