Commit graph

149 commits

Author SHA1 Message Date
Bastien Dejean
82984cf0d5 Fix focus_node regression 2013-05-30 09:54:17 +02:00
Bastien Dejean
41ce28dd3c Still trying to minimize the calls to arrange 2013-05-29 21:44:10 +02:00
Bastien Dejean
e401efd2b4 Add a few debug messages 2013-05-29 21:25:38 +02:00
Bastien Dejean
7de037f459 Don't try to arrange empty desktops 2013-05-29 21:23:34 +02:00
Bastien Dejean
26c84e8221 Avoid NULL node and non-NULL root in focus_node 2013-05-29 20:30:01 +02:00
Bastien Dejean
1e064aa723 Handle remote focus corner case in transfer_node 2013-05-29 20:21:51 +02:00
Bastien Dejean
687c9962f1 Always update focus and history when inserting 2013-05-29 15:24:48 +02:00
Bastien Dejean
6dfff24ce8 Set focus pointer when inserting nodes 2013-05-29 15:13:34 +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
5676458548 New message: 'restore_history'
In addition, the message previously known as 'restore' is now called
'restore_layout'.
2013-05-08 15:10:09 +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
a56e5ddfe6 Handle the node's birth mode consistently 2013-05-08 11:05:48 +02:00
Bastien Dejean
bb34c26052 Fix removal of vacant node
When vacant node are removed we mustn't rotate any subtree since the
node is already out of the tiled layout.
2013-05-07 23:15:18 +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
6c7d7d9444 Stack tiling windows via focus history 2013-05-06 18:31:53 +02:00
Bastien Dejean
7c24244986 Fix typo 2013-05-06 11:46:40 +02:00
Bastien Dejean
06065f0cf5 Merge branch 'master' into history
Conflicts:
	messages.c
	tree.c
2013-05-06 11:36:12 +02:00
Bastien Dejean
8e57511b50 Particularize swap_nodes 2013-05-06 11:28:32 +02:00
Bastien Dejean
a6ad649119 Call put_status when inserting or removing nodes 2013-04-09 22:18:47 +02:00
Bastien Dejean
3581ba51d8 Only call put_status when needed 2013-04-09 11:37:24 +02:00
Bastien Dejean
8a7cab3b5d Consolidate put_status
Only use one character, only letters and don't print useless
informations.
2013-04-08 18:47:45 +02:00
Bastien Dejean
42afe4ad11 New option for bspwm: -p STATUS_PREFIX 2013-04-02 19:46:16 +02:00
Bastien Dejean
f97d35cd96 New arguments for swap: biggest and smallest 2013-04-02 15:02:45 +02:00
Bastien Dejean
bbd0ad810f Fix motion recorder being activated erroneously
We need to check which window is under the pointer after having changed
the z-order of windows.
2013-03-22 18:26:30 +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
0158ea7da6 Change input focus before unmapping 2013-03-18 15:34:07 +01:00
Bastien Dejean
2f6b48af34 Focus the root window on an empty desktop 2013-03-17 22:37:19 +01:00
Bastien Dejean
25b21321d3 Remove trailing spaces 2013-03-16 19:20:20 +01:00
Bastien Dejean
67e57260dd Set current EWMH desktop in restore 2013-03-12 10:34:38 +01:00
Bastien Dejean
45cb3efd44 New message: balance 2013-03-10 18:28:30 +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
6057feed61 Generalize swap_nodes
The `swap_nodes` function was not written to handle nodes from different
desktops. We need to be able to do that in order to move tiled windows
across monitors.
2013-03-07 21:34:33 +01:00
Bastien Dejean
944cbbd3e3 Merge branch 'master' into history 2013-03-06 14:00:33 +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
fbd397b986 Remove all references in history_remove 2013-03-03 12:41:29 +01:00
Bastien Dejean
409aad038f Merge branch 'master' into focus-history 2013-03-03 10:44:13 +01:00
Bastien Dejean
6bfebaaf6b Focus follows pointer rewrite 2013-03-02 19:39:16 +01:00
Bastien Dejean
0f6f533a87 Unify tiled and floating pointer actions
The following 'grab_pointer' arguments are removed: 'move_tiled',
'resize_tiled'. The regular 'move' and 'resize_*' arguments shall be
used instead. The 'fence_grip' parameter is no longer meaningful and
has been removed. Moving and resizing now behaves the same for tiled and
floating windows.
2013-02-28 15:04:14 +01:00
Bastien Dejean
df928c7053 New message: 'flip' 2013-02-26 12:54:01 +01:00
Bastien Dejean
7741295902 Add tiled move/resize pointer actions
New arguments for `grab_pointer`: `{move,resize}_tiled`.
New setting: `fence_grip`.
2013-02-04 14:22:41 +01:00
Bastien Dejean
890c4a1f3b Merge branch 'master' into focus-history 2013-01-19 21:45:05 +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
ec46a11d3e Don't exclude unmapped windows 2013-01-08 16:24:00 +01:00
Bastien Dejean
240b6798b0 New messages: '{grab,track,ungrab}_pointer' 2013-01-08 15:52:20 +01:00
Bastien Dejean
45ef3b78cc New message: 'mouse'
The code related to mouse buttons handling is gone.
Mouse bindings must now be created via sxhkd.
2013-01-06 18:04:55 +01:00
Bastien Dejean
ee6f449789 Restore the event mask of the clients in 'restore' 2013-01-02 14:40:18 +01:00
Bastien Dejean
85c2983df2 New message: 'restore' 2012-12-27 22:36:06 +01:00