Commit Graph

4561 Commits

Author SHA1 Message Date
Tony Crisci babfb779d7 Implement the window::floating event
The window::floating event should be emitted when a window transitions
to or from the floating state.
2014-06-23 21:18:12 +02:00
Tony Crisci c2b6b06da7 Make command `move [direction]` work with criteria
A container selected with criteria should be moved with the `move
[direction]` command, instead of this command always acting on the
focused container.
2014-06-23 21:17:27 +02:00
Tony Crisci c936232545 Consistently parse workspace numbers
Use ws_name_to_number() to parse workspace numbers where this
transformation takes place.
2014-06-23 21:16:18 +02:00
Michael Stapelberg cd06da711c DEPENDS: add libxkbcommon{,-x11}, update lkgv (Thanks okraits) 2014-06-22 14:42:28 +02:00
Michael Stapelberg 3f5a0f0024 Switch to xcb-xkb and libxkbcommon
This removes our last dependency on Xlib! :)

(Okay, an Xlib dependency still comes in through other libraries that we
 link against, but it’s not us. Our code is simpler by this change and
 uses one less connection to X11.)
2014-06-21 19:10:37 +02:00
Tony Crisci cf6cc134b8 Implement the window::move event
The window::move event should be emitted when the window moves position
in the tree.
2014-06-19 13:00:17 +02:00
Tony Crisci 25ca78bbba Implement the window::close event
The window::close event should be emitted when a window closes.
2014-06-19 12:59:25 +02:00
Tony Crisci 0df172fd05 Feature: implement mouse bindings
A configured mouse binding (for example `bindsym button3 kill`) runs
its command when the mouse button is pressed over parts of a container.

If the binding has no modifer, it will only run when the button is
clicked on the window titlebar.

Otherwise if the binding has a modifier, it will run over the titlebar
or any part of the contained window.

fixes #558
2014-06-19 12:28:54 +02:00
Michael Stapelberg 0bc73f526d tests: explicitly set input hint
Since i3 honors the “Globally Active Input” focus model, we need to
explicitly state that we are not using that in our testcases :).

This requires X11::XCB from git to work (commit
71b25dcaafc509e710b8fd7de20c97ac3549fc39).
2014-06-19 12:17:39 +02:00
Tony Crisci 8a618e4b00 bugfix: don't set input focus if not accepted
http://tronche.com/gui/x/icccm/sec-4.html#s-4.1.7

> Clients using the Globally Active model can only use a SetInputFocus request
> to acquire the input focus when they do not already have it on receipt of one
> of the following events:
> * ButtonPress
> * ButtonRelease
> * Passive-grabbed KeyPress
> * Passive-grabbed KeyRelease

Since managing a window happens on a MapNotify (which is absent from this
list), the window cannot accept input focus, so we should not try to focus
the window at all.

Fixes an issue with xfce4-notifyd which (correctly) declines focus when
we send WM_TAKE_FOCUS, which puts i3 in a state where i3 focus and X
focus are different when a notification appears.
2014-06-19 11:55:28 +02:00
Tony Crisci b47f480728 Implement EWMH number of desktops property
_NET_NUMBER_OF_DESKTOPS:

> This property SHOULD be set and updated by the Window Manager to
> indicate the number of virtual desktops.

We interpret this property as the number of noninternal workspaces.
2014-06-19 11:21:03 +02:00
Michael Stapelberg 4c06e7a573 clang-format-3.5 **/*.h **/*.c
This should be the last commit that formats a big bunch of files. From
here on, whenever I merge patches, I’ll run clang-format like described
in the title.
2014-06-19 11:20:32 +02:00
Michael Stapelberg 4211274fcd clang-format: don’t define ForeachMacros
Otherwise clang-formatting **/*.h breaks include/queue.h
2014-06-19 11:17:46 +02:00
Tony Crisci f4a8253593 userguide: document exit confirmation dialog
In the section "Exiting i3", document the confirmation dialog (nagbar)
that will show when the user presses the default keys to exit in such a
way to hint that it is configurable.
2014-06-16 09:50:31 +02:00
Tony Crisci fef46de283 docs: fix ipc library list formatting 2014-06-16 09:41:26 +02:00
Michael Stapelberg d8328c7896 debian: add placeholder changelog entry 2014-06-15 19:37:38 +02:00
Michael Stapelberg 2924044505 debian: bump standards-version to 3.9.5 (no changes necessary) 2014-06-15 19:37:03 +02:00
Michael Stapelberg d75c5a18d7 debian: install i3-save-tree(1) manpage 2014-06-15 19:36:54 +02:00
Michael Stapelberg e77b7e6167 debian: update changelog 2014-06-15 19:15:44 +02:00
Michael Stapelberg 34f6f185bf Merge branch 'next' 2014-06-15 19:14:36 +02:00
Michael Stapelberg f30c0a4fc7 Merge branch 'release-4.8' into next 2014-06-15 19:14:25 +02:00
Michael Stapelberg 30992e48d8 man: bump version to 4.8 2014-06-15 19:12:16 +02:00
Michael Stapelberg 9200094203 format **/*.c with clang-format-3.5
This has multiple effects:

1) The i3 codebase is now consistently formatted. clang-format uncovered
   plenty of places where inconsistent code made it into our code base.

2) When writing code, you don’t need to think or worry about our coding
   style. Write it in yours, then run clang-format-3.5

3) When submitting patches, we don’t need to argue about coding style.

The basic idea is that we don’t want to care about _how_ we write the
code, but _what_ it does :). The coding style that we use is defined in
the .clang-format config file and is based on the google style, but
adapted in such a way that the number of modifications to the i3 code
base is minimal.
2014-06-15 19:07:02 +02:00
Michael Stapelberg 4d937b7dbb add .clang-format, to be used with clang-format-3.5 2014-06-15 19:05:01 +02:00
Michael Stapelberg df3f588cb5 delete old release notes 2014-06-15 18:27:03 +02:00
Michael Stapelberg e07c49f4fb add release notes for v4.8 2014-06-15 18:26:40 +02:00
Michael Stapelberg b83c3909b4 man/i3.man: update to contain new default font 2014-06-15 18:18:44 +02:00
Michael Stapelberg 893dbae4b1 Bugfix: don’t overwrite the window’s geometry after restarting
fixes #1263
2014-06-13 22:29:47 +02:00
Michael Stapelberg e69fcbb17b Bugfix: ensure floating windows don’t drop out of fullscreen when restarting
fixes #1263
2014-06-13 22:26:06 +02:00
Michael Stapelberg 35f15f855d Bugfix: don’t errnously render floating fullscreen windows during restart
fixes #1263
2014-06-13 22:21:00 +02:00
Michael Stapelberg 2e4a2d4f30 Bugfix: don’t overwrite the original size of floating windows when changing border style
fixes #1263
2014-06-13 22:19:23 +02:00
Michael Stapelberg 570b5729cc also change the default font in i3.config.keycodes 2014-06-13 20:02:34 +02:00
Tony Crisci 6d0071db19 default config: use `set` for directions
Using `set` for direction letter keys makes them easier to configure for
users who prefer traditional vim-style directions.
2014-06-13 20:01:18 +02:00
Michael Stapelberg 807ff6b10d fix warning: use size_t when comparing against strlen() 2014-06-12 21:24:29 +02:00
Michael Stapelberg 5beaea3034 handle windows whose WM_TRANSIENT_FOR points to themselve
I consider this behavior broken and not respecting the standard, but it
happens in real life, and it’s better for i3 to not busy-loop in such a
situation :).

fixes #1259
2014-06-12 21:16:45 +02:00
Michael Stapelberg 1527f2b8a6 Revert "Rerender on button press only when focus changes"
This reverts commit b714878f52.

That commit introduced a regression: clicking on floating windows would
no longer raise them reliably.

fixes #1260
2014-06-12 21:03:13 +02:00
Tony Crisci 9cee8dac5e Bugfix: Set input focus with last timestamp
Setting input focus with the last event timestamp prevents race
conditions when setting focus.

fixes #1127
2014-06-12 09:33:35 +02:00
Michael Stapelberg 0552fd5666 Bugfix: fix crash when using multiple for_window statements that move windows (Thanks Antonio)
fixes #1257
2014-06-12 09:32:55 +02:00
Marcus Crestani a76a81f80b Include sys/sysctl.h after i3.h to prevent redefinition warnings caused by queue.h on OS X. 2014-06-11 23:27:02 +02:00
Holger Langenau e562aeb338 Bugfix: Typo in i3.xsession.desktop TryExec rule.
Typo in executable for TryExec prevents LightDM from starting i3.
2014-06-11 23:26:43 +02:00
Tony Crisci 8ece995001 Bugfix: prevent unneeded render on pointer enter
When `focus_follows_mouse` option is on, prevent an uneeded render on
pointer enter when the con is already focused.

This pointer enter might be caused by entering a window decoration of an
already-focused container.

This extra render can cause concurrency issues when focus is set
asynchronously with WM_TAKE_FOCUS.
2014-06-11 09:38:49 +02:00
Michael Stapelberg 94574db6f6 cleanup temporary directory when restarting and not using XDG_RUNTIME_DIR
fixes #1253
2014-06-11 09:17:43 +02:00
Michael Stapelberg 6fe44d8584 debian: recommend fonts-dejavu-core after we switched the default 2014-06-08 22:28:13 +02:00
Michael Stapelberg 34cd06be7a default config: switch to “DejaVu Sans Mono 8” as default font
As mentioned in the comment, this change is motivated by better support
for unicode, right-to-left rendering and scalability on retina/hidpi
setups.
2014-06-08 22:25:59 +02:00
Michael Stapelberg 26460c091a delete ipc socket when exiting, cleanup tmpdir
fixes #1253
2014-06-08 22:13:43 +02:00
Michael Stapelberg 617afc67a2 replace remaining printf()s with D?LOG
fixes #1252
2014-06-08 21:56:14 +02:00
Campbell Barton 030595a4eb Use XCB_BUTTON_INDEX defines for mouse buttons 2014-06-08 13:55:27 +02:00
Tony Crisci 7e564713f9 Don't ELOG ipc EOF
Receiving EOF from a client is not an error, but rather a standard way a
client may disconnect from the IPC. This should rather be logged from
a consumer of the libi3 ipc_recv_message() function as a normal client
disconnect event.

fixes #1252
2014-06-08 13:54:55 +02:00
Matthias Thubauville 42804b4555 Mod i3.xsession.desktop for autostart Ubuntu 14.04
i3 started from lightdm properly, but autostart did not work. The line
"X-LightDM-DesktopName=i3" seems to be responsible to allow autostart.

Tested on a clean install of Ubuntu 14.04.
2014-06-08 13:54:43 +02:00
Tony Crisci 7482a0f642 Add abstraction for running a binding
Add run_binding function to bindings.h.

> Runs the given binding and handles parse errors. Returns a
> CommandResult for running the binding's command. Caller should render
> tree if needs_tree_render is true. Free with command_result_free().
2014-06-01 11:55:01 +02:00