Commit Graph

187 Commits (bc52fae15c75635e9cec57e25619d304dba3a69b)

Author SHA1 Message Date
shdown bc52fae15c libi3: change scalloc() signature to match calloc() 2015-08-03 12:50:13 +03:00
Michael Stapelberg 21d4b2319f Properly clear the urgency hint when set by i3.
fixes #1825
2015-08-02 20:50:14 +02:00
Ingo Bürk 94a09b3cac Added missing newlines in log statements. 2015-06-30 20:48:35 +02:00
Ingo Bürk d12482e5fd Added 'con_is_hidden' to check whether a given container is visible to the user assuming its workspace is visible.
This is useful for determining whether we want to set the _NET_WM_STATE_HIDDEN atom on the window.
2015-04-21 09:13:48 +02:00
Deiz 884214f14f Update copyright notices and get rid of ranges
The script used to make these changes can be found at:

   https://gist.github.com/Deiz/32322020f76d23e2bf8f
2015-04-20 17:50:21 -04:00
Ingo Bürk a59fe0d3d2 Added test case for transfer of urgency flag when moving a window to a mark. 2015-04-19 20:57:49 +02:00
Ingo Bürk 283b231290 Disallow moving a container to itself since this would crash i3. 2015-04-19 20:57:49 +02:00
Ingo Bürk 475671ae2a Added 'con_move_to_mark' to move a container to the container holding a certain mark. 2015-04-19 20:57:49 +02:00
Ingo Bürk 9ab4216787 Extract a function from con_move_to_workpsace that deals with moving a container to some other container rather than being restricted to moving to a specific workspace. 2015-04-19 20:57:49 +02:00
Ingo Bürk c4a84385d6 added function 'con_by_mark' to look up a con holding the given mark 2015-04-19 20:57:49 +02:00
Ingo Bürk edda9306ed Removed comment on removal of legacy "default" layout.
closes #1649
2015-04-11 10:27:42 +02:00
Ingo Bürk 6a5d561235 Move urgency hint when moving container
When an urgent container is moved to another workspace, the urgency hint
1) is unset on the source workspace and
2) set on the target workspace

fixes #1187
2015-03-28 18:29:34 +01:00
Michael Stapelberg 091f1db39a run clang-format (3.5.0)
Not quite sure why there are so many differences. Perhaps we’ve gotten
out of the habit of running clang-format after every change.

I guess it’d be best to have a travis hook that runs clang-format for us
and reports any problems on pull requests.
2015-03-01 17:16:03 +01:00
Michael Stapelberg fbe25297b7 Properly invalidate rendering cache when updating orientation (Thanks hercek)
fixes #1445
2015-02-11 21:13:55 +01:00
Michael Stapelberg 073ecdd711 Revert "don’t fix coordinates/change focus/warp when source_output was scratchpad"
This reverts commit 9480801927.

This causes focus issues.
2015-01-23 17:11:05 +01:00
Michael Stapelberg 9480801927 don’t fix coordinates/change focus/warp when source_output was scratchpad 2015-01-23 17:07:31 +01:00
Tony Crisci 823b46a544 Include workspace con in workspace event
Send the affected workspace in the "current" property for each workspace
event for any type of workspace event that affects a particular
workspace.

fixes #1411
2014-12-22 09:47:31 +01:00
Mats e59a76e456 Extend the fullscreen command
Rather than just toggling the fullscreen modes, allow to set them
directly with:

    fullscreen enable|toggle [global]
    fullscreen disable

For compatibility, retain the previous command and its toggling behavior:

    fullscreen [global]

fixes #1120
2014-12-10 20:42:52 +01:00
Michael Stapelberg 89d3f93bec Merge branch 'master' into next 2014-08-08 20:16:40 +02:00
Michael Stapelberg fc88631534 Bugfix: don’t set focus in con_set_layout() on invisible workspaces
fixes #1338
2014-08-08 20:15:59 +02:00
Michael Stapelberg 0d656dd05d don’t set names corresponding to debug colors, remove “sleep 1”.
The names were (mostly) internal to i3 anyway.

Hopefully this doesn’t break anything, but I really think this old
behavior needs to go now :).
2014-07-15 10:36:31 +02:00
Tony Crisci 682fb0a291 Implement the window::urgent event
The window::urgent event is emitted when a container becomes urgent or
loses its urgent status.
2014-06-24 09:04:45 +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
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 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 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
Aleksi Blinnikka 89dd868e82 Separate border width for floating windows
Floating windows already had their own border style, but the width was
the same for all windows.

The configuration directives 'new_window' and 'new_float' can now be
used simultaneously to have different border widths for floating and
tiled windows.

fixes #1244
2014-05-16 17:59:21 +02:00
Tony Crisci 4126c87daf Dont include dock clients in ewmh lists
http://standards.freedesktop.org/wm-spec/latest/ar01s03.html#idm140251368149456

The _NET_CLIENT_LIST property of the root window:

> These arrays contain all X Windows managed by the Window Manager.

Dock clients are not managed windows, so they should not be included in
_NET_CLIENT_LIST or _NET_CLIENT_LIST_STACKING.
2014-05-03 15:08:31 +02:00
Tony Crisci 8146638320 Implement the window::fullscreen_mode event
The fullscreen_mode event is a window with the "change" property set to
"fullscreen_mode". This event should be emitted whenever a window enters
or exits fullscreen mode.

This event can be used to turn off dpms off when a window is fullscreen
or display the fullscreen container name in the status line for
instance.
2014-04-30 09:35:31 +02:00
Peter Boström f78c1ba053 Fix 'gcc -Wextra -Wno-unused-parameter'. 2014-01-04 20:43: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
jj 857fc0bf17 Update comment for the con_toggle_fullscreen method 2013-10-23 23:26:44 +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
oblique 78fad71894 Update parent urgency hint if a child is removed. 2013-06-23 22:27:30 +02:00
Diego Ongaro 96575e14a0 Give layout enum a name: layout_t 2013-05-22 19:35:07 +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
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
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
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
Michael Stapelberg 9ae73b7a2a fix possibly uninitialized variable (Thanks knopwob) 2012-12-24 15:13:47 +01:00
Deiz aefcb0b668 Skip floating windows in the focus stack when moving through the tree
Includes a test for the new behaviour
2012-10-16 20:03:40 +02:00
Deiz ca77c12dde Allow workspace contents to be moved if there are only floating children 2012-10-09 21:25:13 +02:00
Deiz cae6fb627f Improve startup sequence termination conditions
If a window with _NET_STARTUP_ID set is moved to another workspace, it
will delete any associated startup sequence immediately. This will also
occur if a window has a leader with _NET_STARTUP_ID set, if the leader
has no container (never been mapped).

A startup sequence may also be deleted if it's matched by
startup_workspace_for_window() and its 30-second timeout has elapsed.
2012-10-04 17:48:51 +02:00
Deiz fdcba7b91a Replace the discrete 'split' Con property with a simple function. 2012-10-04 17:48:08 +02:00
Deiz d7e5da8b39 Un-fullscreen as needed when moving fullscreen containers
This avoids a case where a fullscreen container could be moved onto a
workspace that already had its own fullscreen container, leading to
two fullscreen containers on top of each other.
2012-10-04 17:46:54 +02:00
Deiz a9d859f84e Only re-focus the workspace when moving a con if the target ws is hidden. 2012-10-03 00:03:24 +02:00
Deiz e89a25f81f Implement moving workspaces as if they're regular containers 2012-09-29 00:17:36 +02:00