Commit Graph

2082 Commits (d75c5a18d79f52e5b81a0487e149dab74e76227b)

Author SHA1 Message Date
Michael Stapelberg 2326ebfd63 enable shmlog when invoked as i3-with-shmlog, install symlink + .desktop file 2014-01-04 12:18:45 +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
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
Michael Stapelberg c3ff365072 install i3-save-tree(1) (Thanks Marcin) 2013-12-24 16:15:43 +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 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
Michael Stapelberg 598498330a layout loading: allow comments in JSON files 2013-12-22 21:52:49 +01:00
Michael Stapelberg 0302912b64 swallows: value needs to be loaded as regular expression 2013-12-22 21:52:49 +01:00
Michael Stapelberg ce480dcc74 use splith as default when restoring a layout
This frees users from specifying layouts even when they don’t make any
difference, e.g. leaf nodes.
2013-12-22 21:52:49 +01:00
Michael Stapelberg b2c91f54ab Merge branch 'master' into next 2013-12-21 21:32:55 +01:00
Michael Stapelberg 85321bdf1d Bugfix: ignore _NET_ACTIVE_WINDOW for scratchpad windows (Thanks mistnim)
fixes: #1136
2013-12-21 21:32:23 +01:00
Jean-Philippe Ouellet 755188220f fix the build on OS X
OS X doesn't have posix_fallocate() yet, so put
bf760d0241 in
    #if defined(__APPLE__)

the cd fails with:
    /bin/sh: line 0: cd: include: No such file or directory
so give it a path relative to the top directory
2013-11-26 19:56:45 +01:00
Lancelot SIX f22995393a Remove references to PATH_MAX macro
Since the macro PATH_MAX is not defined on every system (GNU/Hurd being
one of those who do not define it), we remove all references to this
macro. Instead, we use a buffer of arbitraty size and grow it when
needed to contain paths.
2013-11-24 13:50:29 +01:00
Michael Stapelberg 4f5e0e794f persist root window’s background contents to a pixmap
The commit title is fairly technical, so I’ll try to explain.

Recently, users of GDM3 (I’m sure) and LightDM (I think) have reported
that when switching to a new workspace, the contents of the previous
workspace are still visible. i3bar updates, though, so it is the X11
root window which is not being updated here.

When using GDM3, X11 will be started with -background none, and no
background pixmap or pixel is set. Then, apparently,
gnome-settings-daemon will display a fade animation from whatever is
currently on the window to the destination contents. I think this is to
avoid flickering when logging in, which would occur when just setting a
specific background pixmap or pixel.

So, this commit will, when i3 starts first (not on restarts), copy the
contents of the X11 root window (typicall a grey background, at least on
my machine with GDM3) into a pixmap and set that pixmap as background
pixmap. That way, the content will be preserved and one has a
background, instead of what is perceived as a bug :).

This commit has some chance of breakage, so I’m prepared to revert it
unless we can figure out the issues and roll forward.
2013-11-24 13:44:30 +01:00
Michael Stapelberg 1dbdd4fece Merge branch 'master' into next 2013-11-22 17:09:28 +01:00
Tony Crisci 57822e3ed4 Remove-child callback skips output content cons
Every container 'above' (in the hierarchy) the workspace content should
not be closed when the last child was removed.

Add a check for output content containers and do not handle them. These
cons are at the root of the output container with dockarea siblings.
They may be run through this callback when an output is killed with
RandR.

Fixes an issue that caused content cons to become urgent when the output
is killed with RandR.

fixes: #1121
2013-11-22 17:09:23 +01:00
Michael Stapelberg d3beff2339 make i3bar use libi3’s root_atom_contents()
This removes code duplication, which will be useful for a subsequent
commit.

Furthermore, we now don’t open X11 connections unnecessarily in some
corner cases.
2013-11-22 15:48:45 +01:00
Tony Crisci 9f955a1e01 Command 'move <direction>' moves across outputs
When 'move <direction>' is issued in the context of a container that
borders a workspace, and there is no suitable place within this
workspace for which this container can move, move the container to the
closest output in this direction instead.
2013-11-19 20:26:52 +01:00
Tony Crisci f3bf314662 Add sensible discretion to UnmapNotify drag abort
Only abort a drag action on UnmapNotify when the unmapping window is
managed on the current workspace.

fixes #1108
2013-11-10 19:54:49 +01:00
Tony Crisci 9ee26a608e Return DRAG_ABORT on UnmapNotify from drag_pointer
Add DRAG_ABORT to enum drag_result_t. DRAG_ABORT will indicate the drag
operation cannot be completed.

Return DRAG_ABORT on UnmapNotify, or when the keyboard or pointer cannot
be grabbed.

Add DRAGGING to return value for drag_result_t. DRAGGING is used
internally by drag_pointer to indicate the drag is in progress.

Change DRAG_CANCEL to DRAG_REVERT to clarify the distinction between
"abort" and "revert/cancel" actions.

Fixes an issue that caused i3 to crash when a user is dragging or
resizing a floating window that becomes destroyed.
2013-11-09 13:27:42 +01:00
Baptiste Daroussin f691a55923 Use _PATH_BSHELL to ensure using a bourne shell
[Michael]
This commit should fix problems with people using a non-bourne shell as
login shell, e.g. fish or rc. AFAICT, $SHELL should only be used for
interactive shells, but we just want a bourne shell, not an interactive
shell.
2013-11-09 10:11:32 +01:00
jj 857fc0bf17 Update comment for the con_toggle_fullscreen method 2013-10-23 23:26:44 +02:00
jj b6100dd727 Fix output retrieval for floating cons
When focusing/moving to outputs, the method of getting the correct
output for a given container fails if the container in question is
floating and only partially mapped on an output screen. This patch
introduces a fail-safe retrieval of the output for any container.
2013-10-23 23:26:06 +02:00
Tony Crisci e99158e419 Assigned windows open urgent when not visible
When i3 begins to manage a window, if the window opens on a workspace
that is not visible, the urgency hint on the newly managed window will
be set.

fixes #1088
2013-10-19 10:07:24 +02:00
Michael Stapelberg 1c0554564a previous commit: extend test and code to also work with floating windows 2013-10-13 17:59:29 +02:00
jj eef9042713 Fix endless loop when trying to kill a visible workspace
This regression was introduced with commit
97b086efd9

fixes #1103
2013-10-13 17:58:38 +02:00
Michael Stapelberg a09a5c391e Merge branch 'master' into next 2013-10-09 19:49:48 +02:00
Tony Crisci 05e46848f0 Reply to _NET_REQUEST_FRAME_EXTENTS correctly
Reply to _NET_REQUEST_FRAME_EXTENTS by settings _NET_FRAME_EXTENTS
property of the window to widths of the respective borders added by i3.

fixes #1093
fixes #1069
2013-10-09 19:49:37 +02:00
Michael Stapelberg d661c1493c Only abort resizing on KeyPress, not KeyRelease (Thanks vandannen)
Otherwise, releasing a key that was used to trigger the resizing (e.g.
the modifier key) needs to be pressed all the time.
2013-10-01 07:21:40 +02:00
jj 98c4cc46e4 Do not resize/reposition floating containers when moving them to scratchpad 2013-09-30 22:54:35 +02:00
Tony Crisci 459490b67b Add ability to escape out of a mouse-resize operation
Implement #1074. drag_cancel grabs the keyboard and returns DRAG_CANCEL
when the user presses any key during the grab.
2013-09-30 22:54:11 +02:00
jj dbec5eb905 Fix keyboard and mouse resize in nested containers
fixes #1084
fixes #1085
2013-09-26 19:30:07 +02:00
Vivien Didelot 5baada6532 reduce some yajl boilerplate
This patch introduces a yerror() macro in src/commands.c and also
removes some unused yajl helper macros from src/config_directives.c.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
2013-09-26 19:09:39 +02:00
Michael Stapelberg 031de8f720 Merge branch 'master' into next 2013-09-24 07:48:09 +02:00
Michael Stapelberg 1a1d421534 Bugfix: correctly recognize assigned windows as urgent (Thanks jookia)
fixes #1086
2013-09-24 07:47:36 +02:00
syl20bnr 7098ef602b Add new bar.binding_mode_indicator configuration.
i3 current behavior hides the binding mode indicator when
workspace buttons are disabled.
This patch adds a new configuration for i3bar called
'binding_mode_indicator' which acts like the workspace_buttons.
It is now possible to configure i3bar to hide the
workspace buttons and keep showing the binding mode indicator.
This should make the hide workspace buttons configuration
more convenient for those who are heavily using binding
modes.
Default value for binding_mode_indicator is true.
2013-09-24 06:59:26 +02:00
jj 97b086efd9 Close all children when closing a workspace
fixes #591
2013-09-24 06:45:52 +02:00
jj ee04f8bfda Fix handling of new windows with WM_STATE_FULLSCREEN
If the currently focused window is in fullscreen mode, and a new window
is opened with WM_STATE_FULLSCREEN set, the new window now becomes the
new fullscreen window and gains focus.
2013-09-24 06:36:56 +02:00
Michael Stapelberg a52b5212ea Merge branch 'master' into next 2013-09-01 13:35:19 +02:00
Michael Stapelberg 2481b9dcd7 Bugfix: don’t flatten tabbed/stacked containers
fixes #1053
2013-09-01 13:35:04 +02:00
Michael Stapelberg 599a4d48e6 Merge branch 'master' into next 2013-08-30 20:01:04 +02:00
Michael Stapelberg 93463bc393 Bugfix: update root geometry on output changes for “fullscreen global” (Thanks kaersten)
fixes #1064
2013-08-30 19:59:57 +02:00
Michael Stapelberg 1a7fe4ee79 Merge branch 'master' into next 2013-08-27 20:23:00 +02:00
Michael Stapelberg 103ab83131 Revert "raise fullscreen windows on top of all other X11 windows"
This reverts commit 0659a0d98c.

It was a fix for dzen2 setups, but broke several other use cases.
Because dzen2 is not really important since most people use i3bar
nowadays, let’s revert this.

fixes #1062
fixes #1068
fixes #1070
2013-08-27 20:21:11 +02:00
Leo Gaspard c9611b320b Remove debug message when debugging is disabled
More precisely, switch from printf to DLOG a "matching: * / *" message, like all
the other "matching: * / *" messages.
2013-08-20 19:06:03 +02:00
Bas Pape a5ee699d36 Initialize variables to prevent (false) warnings. 2013-08-20 19:05:48 +02:00
Sebastian Ullrich 431e98dc35 Respect workspace numbers when looking for a free workspace name
This prevents a ws '1' appearing on a new output when there's
already a ws '1: www' on an existing output
2013-08-18 17:47:53 +02:00
Michael Stapelberg da20cd397c switch from libXcursor to xcb-util-cursor 2013-08-17 09:44:20 +02:00
Franck Michea 69d7adcf49 Add missing return after error reporting. 2013-08-08 22:44:23 +02:00
Kacper Kowalik (Xarthisius) 0b168ee499 Include float.h for DBL_EPSILON
https://bugs.gentoo.org/show_bug.cgi?id=480272

Patch was written by Jeroen Roovers <jer@gentoo.org>
2013-08-08 22:37:27 +02:00
Michael Stapelberg bf760d0241 log.c: use posix_fallocate() instead of ftruncate() (Thanks don)
The effect is that the error handling is much better. posix_fallocate()
will allocate all the requested space, whereas ftruncate() does not.

Before this commit, in case the /dev/shm filesystem is too small to hold
the _contents_ of the log file, i3 will SIGBUS when writing to the shm
logfile. With this commit, it will print an error message on startup,
but continue to run without logging.
2013-08-01 00:42:24 +02:00
Michael Stapelberg 0c7a76c2f1 Handle the _NET_REQUEST_FRAME_EXTENTS ClientMessage (java compat)
This ClientMessage can be used to estimate how big the window will be
before opening it. Java always sends the ClientMessage and checks the
atom that should be set by the window manager, but it seems that the
fallback code path has a race condition.

Let’s see if the situation gets better with this change. I have been
running this patch for about two weeks and have not seen any issues with
it.

fixes #934
fixes #709
2013-07-27 15:06:08 +02:00
koebi 88671986f4 implement unmark command 2013-07-17 23:02:31 +02:00
Michael Stapelberg eec80838ab actively delete _NET_WORKAREA on startup
fixes #1038
2013-07-13 12:24:15 +02:00
Franck Michea 1f8a860744 bugfix: Resize and center a scratchpad even when a criteria is used. 2013-07-11 21:18:21 +02:00
Alexander Berntsen 023594909e Implement debuglog command
Add debuglog command that takes toggle|on|off. Add get_debug_logging()
to be able to toggle. Make t/187-commands-parser.t expect 'debuglog'.
Document the debuglog command in userguide.
2013-07-07 15:33:42 +02:00
Michael Stapelberg 6241419c86 Merge branch 'master' into next 2013-06-29 23:47:29 +02:00
Michael Stapelberg e8759691b8 Bugfix: call i3-nagbar correctly for configfiles without the font directive (Thanks xeen)
fixes #1030
2013-06-29 23:46:53 +02:00
Michael Stapelberg f55b7977e8 Store aspect_ratio instead of weird proportional_{width,height} (Thanks phillip)
This commit only goes to “next” because I am not sure whether it
actually makes things better in all cases and want to give it some
testing first.

There was no documented reason behind using the
proportional_{width,height} variables, so I suppose that code was just
stupidity on my part (it was written merely a month after I started this
project in 2009).

fixes #1032
2013-06-29 23:11:54 +02:00
Michael Stapelberg c4d4418745 Merge branch 'master' into next 2013-06-29 20:58:51 +02:00
Eika Enge 625d5bdba6 Bugfix: Ignore spaces in front of default workspace name 2013-06-29 20:58:15 +02:00
Michael Stapelberg 78e99440f6 Merge branch 'master' into next 2013-06-29 20:28:07 +02:00
Michael Stapelberg b4f7142509 Bugfix: fix focus handling in 'floating disable' on non-visible windows (Thanks necoro)
fixes #1027
2013-06-29 20:27:33 +02:00
Alexander Berntsen 49bc20c934 Fix incorrect comment 2013-06-23 22:34:04 +02:00
oblique 78fad71894 Update parent urgency hint if a child is removed. 2013-06-23 22:27:30 +02:00
Michael Stapelberg 85cb313153 reset shmlogname when disabling the log
This makes the i3-dump-log error message more helpful.
2013-06-23 22:14:39 +02:00
Alexander Berntsen f9d93d75b3 Implement shmlog command
Add shmlog command that takes <size>|toggle|on|off. Separate logbuffer
management into open_logbuffer() and close_logbuffer(). Make
t/187-commands-parser.t expect 'shmlog'. Add update_shmlog_atom() to
update the SHMLOG_PATH. Document the shmlog command in userguide.
2013-06-23 21:48:02 +02:00
Alexander Berntsen 684a77442e Make default shmlog_size a const int 2013-06-12 23:24:07 +02:00
Michael Stapelberg 8353a387c9 Merge branch 'master' into next 2013-05-28 19:56:57 +02:00
Michael Stapelberg 62ef7834b0 Bugfix: Unmap windows before reparenting them to the root window (fixes Mathematica) (Thanks psychon)
Some apps such as Mathematica send a synthetic UnmapNotify event without
properly unmapping their window first. This change makes sure that
happens and fixes an annoying bug with Mathematica where some unmanaged
windows would stay around, but you couldn’t do anything with them.

Thanks to psychon (current awesome maintainer) for helping with the
diagnosis!

fixes #787
2013-05-28 19:52:01 +02:00
Michael Stapelberg e979f16ddb manage.c: use xcb_discard_reply() instead of free()ing the reply (Thanks psychon) 2013-05-28 18:57:26 +02:00
haptix@web.de e3913093b6 introduced i3 command for changing the hidden state and the mode of i3bar
The hidden_state and mode of each i3bar instance can now be controlled from within i3.
Therefore, two new i3 command were introduced:
    _
    bar hidden_state show|hide|toggle [<bar_id>]

    show: always show the bar
    hide: normal hide mode
    toggle: toggle between show and hide (individually for each bar)
    _
    bar mode dock|hide|invisible|toggle [<bar_id>]

    hide,dock: like before
    invisible: always keep the bar hidden
    toggle: toggle between dock and hide (individually for each bar)

This patch introduces a hidden_state ("hidden_state hide|show") in the
barconfig, which indicates the current hidden_state of each i3bar
instance. It only affects the bar when in hide mode. Additionally, a new
invisible mode was introduced. In order to change the hidden_state or
mode of the bar from i3, a barconfig-update event was introduced, for
which a bar can subscribe and the bar then gets notified about the
currently set hidden_state and mode in its barconfig.

For convenience, an id field ("id <bar_id>") was added to the barconfig, where one can
set the desired id for the corresponding bar. If the id is not specified, i3 will
deterministically choose an id; otherwise, with the previous random approach for finding
a new id, which is actually not shared with i3bar, as it would determine its id on
startup, the event-subscription would be destroyed on reload. Still, this issue remains
when manually changing the bar_id in the config and then reloading.

fixes #833, #651
2013-05-25 23:00:36 +02:00
haptix@web.de f0eba6d15c Fix problem when moving fullscreen window to scratchpad
When moving a fullscreen window to scratchpad with 'move scratchpad', the
focused window would stay fullscreen.

Also, when having a container in fullscreen mode and then focusing a child of
this container and moving it to scratchpad, it would enable fullscreen for
the child window.

This patch fixes both problems, so the scratchpad window is always floating.
2013-05-25 22:59:27 +02:00
Diego Ongaro 609496d13f Draw indicator border only for split layouts
In order to distinguish split layouts from tabbed/stacking layouts when
only one window is shown, do not draw the indicator border for tabbed or
stacking layouts.
2013-05-22 19:35:33 +02:00
Diego Ongaro 96575e14a0 Give layout enum a name: layout_t 2013-05-22 19:35:07 +02:00
Michael Stapelberg 0f6b5fe8da Merge branch 'master' into next 2013-04-23 07:18:39 +02:00
Clément Bœsch b7da2dbcd8 render_con: fix height rounding in aspect ratio computation
With a 484x292 window and proportion of 488x294, new_height is
291.590164 after the loop, causing a rounding issue leading to a window
of 484x291.
2013-04-23 07:18:35 +02:00
Michael Stapelberg 06730f44e6 Merge branch 'master' into next 2013-04-15 21:01:27 +02:00
oblique a93e1e5c59 Ensure that resize will take place even if pixel is smaller than size increments.
fixes #1011
2013-04-15 20:59:51 +02:00
Eric S. Raymond d0fbc10aca Typo and usage fixes in documentation and comments. 2013-04-11 22:37:39 +02:00
Michael Stapelberg 0659a0d98c raise fullscreen windows on top of all other X11 windows
Note that this is ineffective for dunst’s notifications because dunst
re-raises them as soon as they get obscured. It does work for dzen2
however, which was the original use-case.

fixes #569
2013-04-07 15:38:00 +02:00
Michael Stapelberg bb22e232ad Merge branch 'master' into next 2013-04-07 10:00:42 +02:00
Michael Stapelberg 9f353996fe tabbed: floor(), put extra pixels into the last tab (Thanks xeen)
This is the only sane way I can think of to deal with the problem that
the screen size may not be dividable by the amount of tabbed children
(e.g. 1280 / 41 = 31.219512…).

fixes #645
fixes #791
2013-04-07 10:00:28 +02:00
Michael Stapelberg 0b000b1464 Merge branch 'master' into next 2013-04-02 23:59:48 +02:00
Michael Stapelberg 0901720a24 Bugfix: fix floating window size with hide_edge_borders (+test)
fixes #998
2013-04-02 23:59:26 +02:00
haptix@web.de 2926ddb69f ipc: use correct workspace in workspace change event
fixes #990
2013-04-02 22:27:04 +02:00
Eelis van der Weegen 7f5a18e093 Add 'line' as a configuration parsing primitive
…and use it for ignoring comment lines, so that quotes in them
doesn't cause problems anymore.
2013-04-02 22:26:29 +02:00
Philippe Virouleau 0a3d42c21e Fix scratchpad_show
Test if window is in scratchpad
    Test if function is called without criteria
    Updated testcase
2013-03-27 21:51:13 +01:00
Yuxuan Shui 5adb09c5fc Use a saner sanity check for floating_reposition.
The function contained_by_output checks whether any output contains any
parts of a give rect. Rather than relying on the central point of the rect.
2013-03-21 23:41:07 +01:00
Yuxuan Shui 5b4ff1804d Fix restarting with 32bit depth windows (v5)
What I do in this patch is:

1. Split the con_new() function, so I can create a Con without actually
create a window.
2. Store the depth of Cons in the layout file when i3 is restarting.

Fix typos and mis-staged files in previous patch.
2013-03-21 23:38:09 +01:00
Baptiste Daroussin 505d87ef3e FreeBSD expect a real path on the filesystem for shm_open 2013-03-20 17:29:06 +01:00
Baptiste Daroussin 346cba0e0f shm_unlink the created/open shm 2013-03-20 17:26:14 +01:00
Baptiste Daroussin f530e5452d Do not use ELOG while logwalk is not initialized 2013-03-20 17:24:10 +01:00
Michael Stapelberg 271189444d bump copyright years to 2013 2013-03-17 01:01:04 +01:00
Michael Stapelberg 083611e434 Bugfix: Don’t warp the pointer when dragging floating windows
fixes #951
2013-03-15 19:27:08 +01:00
Michael Stapelberg 2640fb2b5f makefile: delete test.{config_parser,commands_parser} in distclean 2013-03-12 14:03:22 +01:00
oblique 8a4a719093 Add support for _NET_WM_STATE_DEMANDS_ATTENTION.
_NET_WM_STATE_DEMANDS_ATTENTION indicates that some action in or with
the window happened. It's a weaker hint than urgency flag of WM_HINTS,
but some applications and almost all Qt applications use it instead of
WM_HINTS' urgency flag (one example is Skype).
2013-03-09 10:55:13 +01:00
Michael Stapelberg 7ecdcb61f8 config: accept “smart” as popup_during_fullscreen parameter (Thanks supplantr)
This was the default, so explicitly setting it is not really necessary,
but of course it should be possible.

fixes #967
2013-02-24 17:23:37 +01:00
Mats a38749e7e4 Bugfix: Handle nested transient popups properly
During smart popup fullscreen handling, display all transient popups
that belong to the respective fullscreen application. A popup window
belongs to another window if the latter is reachable via the path
induced by the WM_TRANSIENT_FOR hints.

fixes #881
2013-02-24 15:59:38 +01:00
Piotr S. Staszewski 3facbbca5c Add a new IPC event for changes on windows.
Added new event id (I3_IPC_EVENT_WINDOW) so that a an IPC client can
subscribe to events on windows. Added a basic window event that gets
triggered when a window gets successfully reparented. This new event
also dumps the container data, so that IPC clients can get the initial
window name. IPC clients wishing to see window events should subscribe
to 'window'.
2013-02-18 10:55:11 +01:00
Artem Shinkarov 5f05ca6b5d Separator color via config; separator width and on/off via ipc
This patch adds the following features:
1) Configure a color of the separator via config.  It is done like
   bar {
      colors {
         separator #000000
      }
   }
2) A block can have an integer entry "separator_block_width" which
   sets the width of the gap which would follow after the current block.

3) A block can have a boolean entry "separator" and if it is set
   to false, then the drawing of the separating line would be disabled.
2013-02-18 10:44:44 +01:00
Sebastian Ullrich 49979c9d15 Always auto center on 'scratchpad show' if window hasn't been repositioned by the user
This change ensures a scratchpad window is still centered on the screen
if it has first been shown on another screen of a different
resolution. Moving or resizing the scratchpad manually disables this
behavior.
2013-02-18 10:38:28 +01:00
Mats fa4301e06d Split workspace instead of changing orientation
Move all children of the workspace into a new container if there is more
than one otherwise simply change the orientation.

fixes #922
2013-02-15 03:16:02 +01:00
oblique e92dd1acc6 Obey WM_SIZE_HINTS's resize increments in floating 2013-02-14 19:38:26 +01:00
oblique b0e2be9a6b Add render_deco_height() 2013-02-14 19:37:52 +01:00
Sebastian Rachuj b565bfca13 Bugfix: Do not move focus if a container is moved across outputs
fixes #809

This makes the moving behavior more consistent. If you want to focus the
workspace you are moving to, just chain the keybinding in your config
file:

    bindsym $mod+Shift+1 move workspace 1; workspace 1
2013-02-10 17:38:17 +01:00
Sascha Kruse bbede97966 scratchpad_show focus unfocused scratchpad window
When there's an unfocused scratchpad window on the current workspace
scratchpad_show will focus that scratchpad window.
2013-01-30 13:33:55 +01:00
Marius Muja b1cc4d5166 Fix decoration rect size for windows without border 2013-01-26 19:31:15 +01:00
Francesco Mazzoli f13d8ed06f wrap when moving things to outputs with direction 2013-01-26 19:27:58 +01:00
Michael Stapelberg 62b0df0640 Make i3-nagbar use the same font as configured for i3 2013-01-26 09:55:38 +01:00
Adrien Schildknecht 76ef3a4ab8 remove the urgency indicator when a window is closed 2013-01-25 18:53:59 +01:00
Michael Stapelberg 74558bb33d Call scratchpad_show() when focusing scratchpad windows via criteria
fixes #931
2013-01-25 16:11:20 +01:00
Michael Stapelberg 2ea94420d3 Merge branch 'master' into next 2013-01-25 15:48:38 +01:00
Michael Stapelberg 7be5ece663 Bugfix: fix coordinates of scratchpad windows on output changes (Thanks badboy)
Previously, after reconfiguring monitors, scratchpad windows could still
be focused but might be out of bounds for you to see.

fixes #929
2013-01-25 15:47:43 +01:00
Michael Stapelberg a32d2d5d61 scratchpad: fix crash when moving last window of an invisible workspace (+test) (Thanks bafain)
It looks like the code which was removed with this commit was not
necessary anyways since con_move_to_workspace() by now checks on its own
whether it moves to the scratchpad.

fixes #913
2013-01-25 15:28:58 +01:00
Michael Stapelberg f767ac30b3 fix two more crashes when disabling an empty output 2013-01-25 14:53:15 +01:00
Michael Stapelberg e0cfe1f8c0 Bugfix: fix crash when disabling output without any windows (Thanks xeen, knopwob)
fixes #919
2013-01-25 14:14:06 +01:00
Michael Stapelberg a5c9b0dedb Merge branch 'master' into next 2013-01-24 14:45:14 +01:00
Michael Stapelberg 2eb4ed95bc Bugfix: fix “overlapping” --release key bindings (Thanks phlux)
We eagerly marked all KeyRelease bindings as eligible to match without
checking modifiers, while this should only be allowed for the key
binding which actually was pressed.

fixes #915
2013-01-24 14:44:01 +01:00
Marius Muja bfd150872d Fixing continuous resize bug in floating mode
fixes #910
2013-01-24 12:42:13 +01:00
David Edmondson 3365b52384 Allow servers which do not support the XKB extension.
If we can open the X display but the XKB extension is not available,
continue without it.
2013-01-23 20:27:27 +01:00
Michael Stapelberg 2478d0a2e0 ipc: use ipc_recv_message instead of duplicate code
This should fix the situation where i3 would read only the header and
not the payload of the message.
2013-01-23 18:59:36 +01:00
Michael Stapelberg dcb8ac84f8 ipc_recv_message: store message_type, don’t compare. add distinct EOF retval
Also use ELOG, which requires i3-msg to provide logging functions.
2013-01-23 18:51:39 +01:00
Michael Stapelberg 2c249b6949 Merge branch 'master' into next 2013-01-01 16:31:27 +01:00
Michael Stapelberg 138e04fd4d Bugfix: Fix for_window moving of assigned windows (Thanks bafain)
fixes #909
2013-01-01 16:31:08 +01:00
Michael Stapelberg d8e27dd5aa ignore MotionNotify events generated while warping the pointer 2012-12-27 17:04:13 +01:00
Michael Stapelberg 9edbcc4790 debug message for window focus: include window ID 2012-12-27 16:58:46 +01:00
Michael Stapelberg 54fd3d3480 unregister as window manager before restarting (fixes a race condition) 2012-12-27 16:54:54 +01:00
Michael Stapelberg cde82eafa6 use xcb_aux_sync to make sure our changes reach the X server, flushing is not enough 2012-12-27 16:54:36 +01:00
Simon Elsbrock 0045cfa637 move visible scratchpad window to focused workspace
If there is a visible scratchpad on another (non-internal) workspace,
bring it to the focused workspace instead of doing nothing.

closes #784
2012-12-24 19:20:47 +01:00
Michael Stapelberg b3d7531947 refactor both i3-nagbar starts into src/util.c
With this change, libev >= 4 is a hard dependency. It should be present
in all major linux distributions (even the latest ubuntu LTS).
2012-12-24 16:53:20 +01:00
Michael Stapelberg c127ac3855 remove all references to the old cfgparse 2012-12-24 15:57:02 +01:00
Michael Stapelberg b304e6ad34 remove old cfgparse.{l,y} 2012-12-24 15:46:57 +01:00
Sascha Kruse 5d4a934864 render_con: initialize int sizes[children]
This fixes a clang-analyzer warning
2012-12-24 15:28:17 +01:00
Michael Stapelberg 4f2922de62 Revert "initialize array to fix clang-analyze warning"
This reverts commit 56e0ceb44e.
2012-12-24 15:28:08 +01:00
Michael Stapelberg 56e0ceb44e initialize array to fix clang-analyze warning 2012-12-24 15:19:20 +01:00