Commit Graph

4458 Commits

Author SHA1 Message Date
Michael Stapelberg
dfd9410ab7 Bugfix: set all parsing_* variables to false when starting parsing 2014-01-04 21:23:12 +01:00
Michael Stapelberg
4a9e283f05 Bugfix: fix crash when layout JSON file is partially invalid (Thanks xeen)
Fixes #1145
2014-01-04 21:22:12 +01:00
Tony Crisci
b109b1b20d Disable render-time pointer warps if asked
When `focus_follows_mouse` configuration option is disabled, do not warp
the pointer when focus changes outputs after rendering.

Rationale: this option is meant to be disabled by users who have a setup
where the mouse is usually in the way. These users tend to move the
mouse to a corner or use a utility to hide the pointer when it is not
active. When this user switches focus between outputs, the mouse is
placed in the center of the screen.

This is clearly against the spirit of disabling `focus_follows_mouse`.
Disabling this option now implies disabling "mouse follows focus".
2014-01-04 20:52:12 +01:00
Alexander Kedrik
705b43294a use designated initializers for yajl_callbacks struct 2014-01-04 20:46:46 +01:00
Alexander Kedrik
f1560e5eb6 remove unnecessary forward declaration of set_statusline_error
Attributes can be added to function definitions.
Tested with gcc 4.8.2 and clang 3.3
2014-01-04 20:44:54 +01:00
Peter Boström
f78c1ba053 Fix 'gcc -Wextra -Wno-unused-parameter'. 2014-01-04 20:43:30 +01:00
Michael Stapelberg
b8bf3d39eb Merge branch 'docs-debugging' 2014-01-04 12:23:06 +01:00
Michael Stapelberg
2314f10778 Merge branch 'master' into next 2014-01-04 12:23:06 +01:00
Michael Stapelberg
5e07885d95 install i3-with-shmlog.xsession.desktop, overwrite symlink if it exists 2014-01-04 12:22:53 +01:00
Michael Stapelberg
a32b6da712 Merge branch 'master' into next 2014-01-04 12:20:12 +01:00
Michael Stapelberg
31c3505cbf Merge branch 'docs-debugging' 2014-01-04 12:19:52 +01:00
Michael Stapelberg
2326ebfd63 enable shmlog when invoked as i3-with-shmlog, install symlink + .desktop file 2014-01-04 12:18:45 +01:00
Michael Stapelberg
a37f784945 docs/debugging: use a version command that will work with i3 < 4.3 2014-01-04 12:06:21 +01:00
Michael Stapelberg
92a50db29e docs/debugging: merge the debug symbols/backtrace section
We rarely have crashes, almost always we just need logs.
2014-01-04 12:04:43 +01:00
Michael Stapelberg
2c06dc0a1f docs/debugging: include supported version, recommend --moreversion 2014-01-04 11:54:23 +01:00
Michael Stapelberg
d91e632959 docs/debugging: explain how to enable logging on the fly 2014-01-04 11:47:09 +01:00
Michael Stapelberg
0fdbc1ab97 docs/debugging: update version numbers 2014-01-04 11:46:12 +01:00
Michael Stapelberg
95613f50fd docs/debugging: use bzip2 for consistency with the new ticket form (Thanks x33a) 2014-01-04 11:35:06 +01:00
Peter Boström
9c15b9504e Fix clang -Wextra except -Wunused-parameter.
Cleared all warnings that occur when passing
CFLAGS="-Wall -Wextra -Wno-unused-parameter" to make using clang 3.3 on
Linux x86-64.
2014-01-02 22:15:33 +01:00
Tony Crisci
ac74a63662 i3bar: Don't start child unless status_command
If a command is passed to `start_child` which is NULL, such as in the
case when there is no `status_command` specified in the bar config, do
not start a child process to listen on stdin.

fixes #1140
2014-01-01 15:23:50 +01:00
Peter Boström
38b6936c25 Size resizebar according to container size. 2014-01-01 15:21:33 +01:00
Tony Crisci
69ce33d06d Snap pointer to resize bar on drag resize
When the user initiates a drag resize, draw the resize bar on the border
of the two involved containers and snap the pointer.

This solution produces cleaner code than the former approach where the
caller obfuscated the click coordinates of the event. This may confuse
someone expecting a true button press event.

Fixes an issue where the resize cursor is not shown when the resize bar
is clicked until the user begins to drag the mouse.

Fixes an issue where focus is not properly updated after the drag is
complete when `focus_follows_mouse' option is set, leaving the pointer
in an unfocused window in some cases.

Fixes an issue where the resize bar may jump a few pixels when the mouse
is first moved.

(Thanks to pbos for suggesting this fix and providing an example
implementation)
2014-01-01 15:18:54 +01:00
Alexander Kedrik
e2ebe3e2ae Use #pragma once
#pragma once is safer and simpler. According to Wikipedia it's supported by all major compilers.
2014-01-01 15:06:57 +01:00
Michael Stapelberg
3ebc6654cd Merge branch 'fix-tray-mapped' 2014-01-01 11:10:26 +01:00
Michael Stapelberg
67b213665b Merge branch 'master' into next 2014-01-01 11:10:26 +01:00
Tony Crisci
23b1da598e i3bar: Set mapped flag on trayclient creation
When a trayclient is first created as a structure in memory, explicitly
set the `mapped` flag to false. Otherwise it may initialize to `true` in
some circumstances without actually being mapped, causing a request to
be mapped from the client to be ignored.

Create the trayclient in memory before handling a request to be mapped
immediately.

fixes #1138
2014-01-01 11:10:21 +01:00
Michael Stapelberg
1e1e4ef9df include i3-save-tree in dist tarballs 2013-12-24 18:07:07 +01:00
Michael Stapelberg
c3ff365072 install i3-save-tree(1) (Thanks Marcin) 2013-12-24 16:15:43 +01:00
Michael Stapelberg
cd6fb69977 Merge branch 'dpi-log' 2013-12-24 10:37:14 +01:00
Michael Stapelberg
5cd7979e62 Merge branch 'master' into next 2013-12-24 10:37:14 +01:00
Michael Stapelberg
0883dfbe14 only LOG() the DPI when it changes, DLOG() it otherwise (Thanks lkraav)
This avoids flooding stdout every time some text (e.g. a window
decoration) is drawn, yet leaves the message in place when it’s actually
relevant (upon DPI changes).

fixes #1115
2013-12-24 10:35:56 +01:00
Michael Stapelberg
0b8a7b2d16 debian/: add perl recommends to i3-wm for i3-save-tree(1) 2013-12-22 21:54:13 +01:00
Michael Stapelberg
0d356e748d update DEPENDS 2013-12-22 21:52:49 +01:00
Michael Stapelberg
12885cb0ab add i3-save-tree(1) which dumps the layout of a workspace or an output 2013-12-22 21:52:49 +01:00
Michael Stapelberg
c964c010f0 ipc: dump window properties when not restarting inplace 2013-12-22 21:52:49 +01:00
Michael Stapelberg
e567cf436c dragging: instead of using a custom event loop, use libev
This is done by installing a new check watcher that replaces the main
X11 event handler and calling ev_run with EVRUN_ONCE until the dragging
loop left state DRAGGING.

With this commit, other handlers, most notably the redraw handler for
placeholder windows, get a chance to run when dragging (placeholder!)
windows around.
2013-12-22 21:52:49 +01:00
Michael Stapelberg
f57f94c850 reconnect when the restore X11 connection dies
This could happen if a user uses xkill(1) on a placeholder window.
2013-12-22 21:52:49 +01:00
Michael Stapelberg
42e359ec60 kill placeholder windows when the actual window appears 2013-12-22 21:52:49 +01:00
Michael Stapelberg
28a993e656 replace never-true condition with a working one
state->initial is set to false before calling x_push_node() since we
began pushing the window stack before pushing changes. Therefore, the
condition could never be true.
2013-12-22 21:52:49 +01:00
Michael Stapelberg
318b089e6d fix test after renaming role to window_role 2013-12-22 21:52:49 +01:00
Michael Stapelberg
35b70ca423 introduce client.placeholder color 2013-12-22 21:52:49 +01:00
Michael Stapelberg
639a1b182c set original window title on placeholder windows 2013-12-22 21:52:49 +01:00
Michael Stapelberg
16ea766765 use root window color depth instead of hard-coded 24 2013-12-22 21:52:49 +01:00
Michael Stapelberg
076636a835 display swallows criteria in placeholder windows 2013-12-22 21:52:49 +01:00
Michael Stapelberg
3a4ad9b330 layout restore: create and render placeholder windows
This is not entirely done yet, but TODO entries are placed in the code
where appropriate.
2013-12-22 21:52:49 +01:00
Michael Stapelberg
2ce43783f8 add debug message to trace match deletions 2013-12-22 21:52:49 +01:00
Michael Stapelberg
fcf869439c load_layout.c: use *LOG instead of (f)printf 2013-12-22 21:52:49 +01:00
Michael Stapelberg
ef7b3e5464 allow parsing multiple nodes from a json layout 2013-12-22 21:52:49 +01:00
Michael Stapelberg
6800524f2e GET_TREE: serialize container type into a string
So far, this was blessed for internal use only (by virtue of not being
in the documentation), but we want to expose it for the stored layouts.
2013-12-22 21:52:49 +01:00
Michael Stapelberg
58297f4ab5 layout restore: support more criteria, match only once (+test) 2013-12-22 21:52:49 +01:00