Commit graph

92 commits

Author SHA1 Message Date
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
Bastien Dejean
b1318ee553 Moving a tiled window to another monitor
When we move a tiled window to another monitor via the `move` argument
of the `grab_pointer` message, we shall transfer the related node.
2013-03-09 19:40:47 +01:00
Bastien Dejean
1176b5c369 Lower the motion recorder when querying
The current implementation of `focus_follows_pointer` requires that the
motion recorder be lowered when `xcb_query_pointer` is called,
otherwise, the response will specify the motion recorder as child
attribute.
2013-03-07 21:53:45 +01:00
Bastien Dejean
f9401b9b9b Remove obsolete function 2013-03-04 21:13:10 +01:00
Bastien Dejean
829bc9b91f New setting: 'focus_follows_pointer' 2013-03-04 11:25:12 +01:00
Bastien Dejean
0acdab744c Remove setting: 'focus_follows_pointer'
It is impossible to make the feature work in every cases without
unwanted side effects, therefore it will only exists as a branch.
2013-03-04 11:19:24 +01:00
Bastien Dejean
ca01046c4e Disable motion recording as soon as possible
Also, get_pointed_window needs to lower the motion_recorder
window otherwise xcb_query_pointer will return that window as child
attribute.
2013-03-03 21:46:09 +01:00
Bastien Dejean
6bfebaaf6b Focus follows pointer rewrite 2013-03-02 19:39:16 +01:00
Bastien Dejean
3b77dd4316 Remove the inner and outer borders
The concept of triple border was initially introduced to solve the
visibility problem occurring when the border's environment is similar to
the border itself. In practice however, it doesn't help much and has no
redeeming aesthetic value.
2013-02-06 22:23:49 +01:00
Bastien Dejean
9a72c87da0 Don't alter the floating state of fullscreen windows 2013-01-19 21:34:56 +01:00
Bastien Dejean
6fb843aeee Actually honour 'apply_shadow_property' 2013-01-19 20:58:21 +01:00
Bastien Dejean
373df701cd Only floating windows needs shadow 2013-01-19 20:09:02 +01:00
Bastien Dejean
9bd1e7fff7 Merge branch 'master' into compton-shadow 2013-01-17 10:54:36 +01:00
Bastien Dejean
d3e351adf6 Revert "Cursor pointer feedbacks for 'grab_pointer'"
This reverts commit e1e04bff2e.
2013-01-12 11:12:17 +01:00
Bastien Dejean
e1e04bff2e Cursor pointer feedbacks for 'grab_pointer' 2013-01-10 17:59:22 +01:00
Bastien Dejean
878bc8b144 Focus follows pointer needs enter notify events
It seems that pointer motion events are not sufficient to enforce
'focus_follows_pointer': some windows grab the pointer and catch those
events (e.g.: *zenity*), preventing *bspwm* from receiving them. So we
need to listen to enter notify events too.
2013-01-09 21:33:19 +01:00
Bastien Dejean
240b6798b0 New messages: '{grab,track,ungrab}_pointer' 2013-01-08 15:52:20 +01:00
Bastien Dejean
6526e56b8c Remove settings: '{numlock,capslock}_modifier'
The lock keys (num, caps, scroll) are now handled internally and the
aforementioned settings are obsolete.
2013-01-02 12:36:54 +01:00
Bastien Dejean
cb111d3aa9 Border color: *urgent* goes before *locked* 2012-12-26 10:30:50 +01:00
Thomas Adam
154163be96 Fix drawing of urgency border colour
It looks as though commit f37c14902f
introduced a regression in the way urgency borders are rendered.  Because
each window is considered across all desktops for monitors, we must now
augment the checking of an urgent client when looking up the border colours
for focused windows also.

Without this, a single window on a desk on an unfocused monitor will be
correctly set as having an urgent hint, but its borders will not pick up on
any urgent border colour settings.
2012-12-26 00:41:23 +00:00