Commit graph

111 commits

Author SHA1 Message Date
Bastien Dejean
d5b84c082a Don't unmap windows in adopt_orphans 2013-09-22 21:46:41 +02:00
Bastien Dejean
70c6cada07 Make focus_follows_pointer work on empty desktops 2013-09-22 11:16:06 +02:00
Bastien Dejean
80caab4445 Make sure strings are null-terminated 2013-09-21 12:39:59 +02:00
Bastien Dejean
3dda8e7f6f Move a few functions from tree to desktop/monitor 2013-09-20 11:57:09 +02:00
Bastien Dejean
85f67b2164 Remove a few useless header inclusion via deheader 2013-09-19 15:38:22 +02:00
Bastien Dejean
d168e919e3 Split types.c into {monitor,desktop,history}.c 2013-09-19 15:02:49 +02:00
Bastien Dejean
b1d793031b Don't support ICCCM's WM_STATE
It seems that it might cause more harm than good.

E.g.: Skype.
2013-09-19 10:29:19 +02:00
Bastien Dejean
afcbf4795e Consider unmapped windows as withdrawn 2013-09-18 12:38:44 +02:00
Bastien Dejean
84572b0204 Set the WM_STATE atom
`xkill` needs this work without the `-frame` option.
2013-09-18 12:07:55 +02:00
Bastien Dejean
5e00bfe688 Add --fullscreen and --locked to rule -a 2013-09-18 11:42:20 +02:00
Bastien Dejean
cc4492d9ca Remove --float-upcoming from control
The following:
    bspc control --float-upcoming
can now be expressed as:
    bspc rule -a \* --floating --one-shot
2013-09-17 11:40:18 +02:00
Bastien Dejean
9a9693545d Add new option for control: --float-upcoming 2013-09-16 13:36:52 +02:00
Bastien Dejean
a0b9199df5 Stack in terms of relative actions
This rewrite is based on a TODO comment for the *stack_refresh*
function of *awesome*:
    It might be worth stopping to restack everyone and only stack `c'
    relatively to the first matching in the list.

And on the concept of relative stacking (via XDG_CONFIG_WINDOW_SIBLING).

Additionally the `adaptative_raise` setting was removed because it
became obsolete when the choice was made of not raising windows when
focusing via `focus_follows_pointer`.

Windows of type *desktop* are now supported (but not managed).
2013-09-12 16:26:01 +02:00
Bastien Dejean
e14ce44333 Factorize client message sending 2013-09-10 10:39:25 +02:00
Bastien Dejean
e757323885 Don't trust WM_PROTOCOLS
Some clients (e.g.: Skype), have WM_TAKE_FOCUS in their WM_PROTOCOLS but
don't respond to it.
2013-09-07 10:14:14 +02:00
Bastien Dejean
f399fb8797 Revert "Don't trust WM_PROTOCOLS"
This reverts commit 2bfaefa08f.
2013-09-06 11:02:50 +02:00
Bastien Dejean
2bfaefa08f Don't trust WM_PROTOCOLS 2013-09-06 10:53:31 +02:00
Bastien Dejean
387ece3688 Implement ICCCM's WM_TAKE_FOCUS behavior
Additionally, the `apply_shadow_property` was renamed to
`apply_floating_atom`.
2013-09-05 15:37:54 +02:00
Bastien Dejean
ea49ed35d7 Compute colors on the fly
When drawing window borders, we must consider the color map of the
window to compute the correct color *pixel*.
2013-09-04 21:57:26 +02:00
Bastien Dejean
72b8431be0 Prevent input focus from being stolen
Example: if one chromium window is opened and a link is opened in
newsbeuter then chromium will steal the input focus (without explicitly
requesting focus via the proper EWMH message).
2013-07-30 14:53:44 +02:00
Bastien Dejean
44414046b9 Don't raise windows via focus_follows_pointer 2013-07-15 20:28:28 +02:00
Bastien Dejean
8fd8521322 Rewrite message handling
The new message syntax:
- Provides 10 commands instead of 60.
- Allows multiple actions to be applied in one call.

The client now returns an non zero exit code when a message fails.

The `is_adjacent` function now handles vacant nodes.
2013-07-12 21:52:02 +02:00
Steven Allen
772da4dc5d Arrange after killing a window
When a window is killed, the unmap event is never fired leaving a hole
in the layout. This commit closes that hole by manually calling arrange
after killing.
2013-06-29 21:01:23 -04:00
Bastien Dejean
4bcb9886f9 Don't call update_current to set the input focus 2013-06-29 21:09:56 +02:00
Bastien Dejean
a6e90f472a Make split mode and direction local 2013-06-27 17:26:52 +02:00
Bastien Dejean
994235d172 Handle insertion at non focused nodes 2013-06-27 17:11:30 +02:00
Bastien Dejean
12403a5081 Handle fullscreen state in apply_layout 2013-06-08 18:31:55 +02:00
Bastien Dejean
b939bd7480 Consider only pointer_follows_monitor exceptions
We'd prefer not to have to clutter `messages.c` with redundant code and
hence we handle the two exceptions instead.
2013-06-08 11:53:48 +02:00
Bastien Dejean
cd97c9b971 Handle visibility within desktop_{show,hide} 2013-06-07 13:58:22 +02:00
Bastien Dejean
f19cf121d7 Call arrange in transfer_node
Fix a few regressions, and add numerous minor cosmetic improvements.
2013-06-06 23:51:30 +02:00
Bastien Dejean
311fbc06d5 New setting: pointer_follows_monitor 2013-06-05 21:21:12 +02:00
Bastien Dejean
25136fc9b5 Add debug outputs for the motion recorder 2013-06-03 20:59:27 +02:00
Bastien Dejean
ffea1b6f52 Synchronize the motion recorder and the root window 2013-06-02 22:03:51 +02:00
Bastien Dejean
0eed40d2f8 Fix stacking of window moved via send_to
When a window is moved to the active desktop of another monitor, we must
reinforce the correct z-order.
2013-06-01 14:27:18 +02:00
Bastien Dejean
d9ffb7050f New message: remove_desktop 2013-06-01 12:00:26 +02:00
Bastien Dejean
82984cf0d5 Fix focus_node regression 2013-05-30 09:54:17 +02:00
Bastien Dejean
e401efd2b4 Add a few debug messages 2013-05-29 21:25:38 +02:00
Bastien Dejean
3b0d482f41 Refactor focus_node and select_*
The select_* and focus_node where initially made independent as to
observe the --follow option. But this is in fact not necessary.
2013-05-29 14:34:27 +02:00
Bastien Dejean
ff9db2a94a Three arguments is enough for focus_node
The fourth argument of `focus_node` was introduced to avoid calling
unneeded functions from `manage_window`: the reason is not good enough
to justify the existence of that extra argument.
2013-05-29 11:36:01 +02:00
Bastien Dejean
82bd5644cb The birth_rotation attribute replaces birth_mode
The `birth_mode` was not sufficient for properly unrotate the brother of
a removed node. The `birth_rotation` stores the rotation applied to the
brother subtree when the node was inserted.

This should help to enforce that (L + n) - n = L in every possible
cases. Which means that adding a node and removing it should leave the
layout unchanged.
2013-05-08 14:10:53 +02:00
Bastien Dejean
365c17b429 Handle birth mode when toggling the floating state 2013-05-08 11:28:42 +02:00
Bastien Dejean
e6da88fa1c New setting: focus_by_distance
The aforementioned setting, when set, makes the focus movements based on
the distances between the window sides.

The `{prev,next}_leaf` functions were taught not to climb above their
roofs.
2013-05-07 22:45:14 +02:00
Bastien Dejean
0bb82628a5 Keep consistent names for node lists 2013-05-07 14:21:15 +02:00
Bastien Dejean
1c83941f7c Reverse history list order
Otherwise, `history_remove` breaks the `latest` state.
2013-05-06 19:24:41 +02:00
Bastien Dejean
6c7d7d9444 Stack tiling windows via focus history 2013-05-06 18:31:53 +02:00
Bastien Dejean
519925bc1d Use the depth of the window for the border pixmap 2013-04-01 12:29:45 +02:00
Bastien Dejean
716872a8e7 Fix bogus shadow property cardinal 2013-03-30 14:44:02 +01:00
Bastien Dejean
1f894fe492 Add support for _NET_WM_STATE_DEMANDS_ATTENTION 2013-03-26 11:34:06 +01:00
Bastien Dejean
84d4ad4eb8 Exhaustively clear input focus before unmapping
This is a fix for the following bug:
https://bbs.archlinux.org/viewtopic.php?pid=1244541#p1244541

I'm not sure why `monsterwm` is immune to this or if there's a better
way to fix it. I've made a test with a simple window listening to
focus{in,out} events and it did receive those events after being
unmapped without needing the fix...
2013-03-18 19:44:09 +01:00
Bastien Dejean
b273b9c9bd New argument for the rule message: follow 2013-03-12 10:56:45 +01:00