Commit graph

179 commits

Author SHA1 Message Date
Bastien Dejean
331cc9e2d5 Add node flag: hidden
Fixes #229.
2016-04-16 18:13:31 +02:00
Bastien Dejean
2b2ed4eb56 Implement focus_follows_pointer via enter_notify
I found a simple fix for #268.
2016-04-15 19:11:30 +02:00
Bastien Dejean
9adc0348ae Try not to freeze the server
Otherwise, we might end up with a frozen server when trying to perform
pointer actions on an unmanaged window.
2016-04-15 17:11:07 +02:00
Campbell Barton
3eca593ef9 Cleanup: indentation
Mixing tabs/spaces
2016-04-11 07:27:28 +10:00
Campbell Barton
81e5e72fa2 Make mouse button actions configurable
Previously this was possible via key bindings, since this operation was removed,
its useful to be able to configure which mouse keys do what.

This example swaps LMB/RMB

```
bspc config pointer_action1 resize_corner
bspc config pointer_action3 move
```
2016-04-11 06:03:50 +10:00
Bastien Dejean
12edac86fa Reinstate built-in pointer bindings 2016-04-07 18:08:32 +02:00
Bastien Dejean
bfffe8b1c7 Transfer nodes moved via configure requests
Fixes #431.
2016-03-26 14:25:40 +01:00
Bastien Dejean
e8aa679cd1 Introduce receptacles
A receptacle is an unfocusable empty leaf node.

Receptacles are used for building a tree without creating windows.

Example:

    bspc node -i
    bspc node @/ -p east -i
    bspc node @/2 -p north -i

    bspc rule -a Abc:abc -o node=@/1
    bspc rule -a Ijk:ijk -o node=@/2/1
    bspc rule -a Xyz:xyz -o node=@/2/2

Fixes #259.
2016-03-26 11:47:17 +01:00
Bastien Dejean
b098530201 Zero-pad printed IDs
It seems that people expect all IDs to have the same length (#361).

And the maximum possible ID is 0x1fffffff (cf. the X11 protocol).
2016-03-23 11:24:47 +01:00
Bastien Dejean
9ae96ebdcd Add IDs to desktops and monitors
There's no constraints on desktop and monitor names, therefore, using a
desktop or monitor name as descriptor is ambiguous.

We put an end to this ambiguity by introducing desktop and monitor IDs.

`bspc query -{M,D}` now yields IDs instead of names.

Fixes #397.
2016-03-16 15:15:27 +01:00
Bastien Dejean
4402b6bae6 Don't try to guess the window rectangle
Fixes #394.
2016-02-12 22:49:06 +01:00
Bastien Dejean
eb07d2fc06 Generalize window commands to nodes 2015-12-22 19:25:45 +01:00
Bastien Dejean
bfb0c37c90 Handle EWMH *state* removal more carefully 2015-12-12 19:13:38 +01:00
Bastien Dejean
5e68419fae Revert "Simplify EWMH state toggling" 2015-12-08 20:46:54 +01:00
Bastien Dejean
15dda1659e Simplify EWMH state toggling 2015-11-17 11:24:52 +01:00
Bastien Dejean
56c8025e4d Try to honor ICCCM input focus policy 2015-11-11 23:01:54 +01:00
Bastien Dejean
d98c3d17ae Document and homogenize subscriber events 2015-11-09 15:00:47 +01:00
Bastien Dejean
f28f33448f Make a clear distinction between states and flags 2015-11-05 14:00:49 +01:00
Bastien Dejean
40cdd64a7b Rewrite the stacking engine
Stacking now involves 3 layers: BELOW, NORMAL and ABOVE.

In each layers, floating windows are stacked above tiled windows.

The *stack* function is now extremely simple: it just inserts an item in
a sorted list, relying on *stack_cmp* to compare clients.

Fullscreen windows are no longer special.
2015-10-26 20:56:56 +01:00
Bastien Dejean
639763c906 Reinstate the motion recorder for FFP
Because many clients (e.g. termite) prevent us (maybe unknowingly) from
capturing motion events on their windows, we're forced to create a
window for this sole purpose.

Grabbing the pointer isn't an option, because it forces us to consider
some of the enter notify events we should be ignoring.
2015-06-12 22:05:22 +02:00
Bastien Dejean
dfc03b5e26 Grab the pointer in order to capture motions 2015-06-11 10:07:01 +02:00
Bastien Dejean
a1d07d6811 Make motion notify debug message more verbose 2015-06-10 09:41:24 +02:00
Bastien Dejean
8821c69527 Only honor FFP in reaction to pointer motion events
It appears that unmapping windows might generate undesirable enter
notify events. It can lead a very nasty bug where the focus constantly
switches between two desktops ad infinitum (cf. #268).
2015-06-09 20:39:00 +02:00
Bastien Dejean
56895ab9ab Implement focus_follows_pointer via enter notify events
The implementation based on a motion recorder had bad side effects.
2015-06-06 18:25:20 +02:00
Bastien Dejean
e9611ded0b Process errors delivered on the event loop
Cf. xcb-requests(3).
2015-02-22 11:34:19 +01:00
Artur Shaik
cd38445039 Protect mouse pointer when pointer_follows_focus set
When dialog window shows, I cannot move pointer outside this dialog window
because when I move it, it jumps in window's center (again on dialog).
So, this commit disables pff when mouse focus event happen and enables
after.
2014-11-27 14:08:43 +06:00
Bastien Dejean
c49bc92d12 Use generic BSD 2-clause license
Fixes #176
2014-10-22 11:53:03 +02:00
Bastien Dejean
ab6b6c5e36 Use proper function names 2014-05-05 11:35:06 +02:00
Bastien Dejean
fd2a62af05 Filter focus requests using client source indication 2014-02-06 20:42:04 +01:00
Bastien Dejean
b9dcab1900 Remove trailing spaces in headers 2014-01-19 14:41:37 +01:00
Bastien Dejean
c231e8cf41 Indentation: convert spaces to tabs
http://lea.verou.me/2012/01/why-tabs-are-clearly-superior/
2014-01-18 16:30:00 +01:00
Bastien Dejean
0d1b920d24 Handle WM_NORMAL_HINTS atom modifications 2014-01-10 12:00:21 +01:00
Bastien Dejean
b47c758ad5 Handle min/max window size hints 2014-01-09 14:58:54 +01:00
Bastien Dejean
0c7e34700d Don't transfer windows on configure requests 2013-12-27 18:55:41 +01:00
Bastien Dejean
48e0043f84 Implement the pseudo-tiled window state 2013-12-27 14:23:25 +01:00
Bastien Dejean
e0b6cd3cd4 *Frames* are unnecessary
The padding settings are sufficient for this.
2013-12-27 10:43:37 +01:00
Bastien Dejean
4451d8f0e7 Asynchronously parse rule command output 2013-11-08 20:31:23 +01:00
Bastien Dejean
c989aa7efc Merge translate_position and translate_client
- Expand `underlying_monitor` into `monitor_from_client` to avoid
  passing a NULL pointer to `translate_client`.
- Remove the `fit_monitor` setting (use the `--center` rule effect
  instead).
- Don't remap a window in it's last location (node invisibility would be
  the proper way to do this).
- Call `translate_client` after configure requests.
2013-10-27 11:25:34 +01:00
Bastien Dejean
343759bf77 Handle _NET_CLOSE_WINDOW 2013-10-26 18:06:04 +02:00
Bastien Dejean
b3b331a57d By default, honor EWMH focus requests 2013-10-26 17:54:44 +02:00
Bastien Dejean
66fb031fd6 Update floating rectangle of tiled windows 2013-10-20 15:24:52 +02:00
Bastien Dejean
6bc128554e Implement frames 2013-10-10 18:24:21 +02:00
Bastien Dejean
15695c066b Add copyright header 2013-10-08 21:05:56 +02:00
Bastien Dejean
35e9927ed9 Make sticky windows stick to their monitor 2013-10-06 16:58:02 +02:00
Bastien Dejean
c6ceca7683 Support _NET_WM_STATE_STICKY client message 2013-10-01 19:34:38 +02:00
Bastien Dejean
f2a578de2b Make the window border width a desktop setting 2013-10-01 14:15:50 +02:00
Bastien Dejean
bfded1effc History is global and stacking is independent
The last desktop and monitor are now deduced from the history.

The stacking order is now independent from the history of the focused
nodes: this prevents hacks on both sides.

All windows are now considered in the stacking algorithm: it prevents
tiled windows from one monitor to appear above the floating windows of
another monitor.

Transfered windows are stacked below the windows of the same kind.
2013-10-01 10:48:03 +02:00
Bastien Dejean
30eb9598b8 Extract pointer functions from events.c 2013-09-25 18:00:01 +02:00
Bastien Dejean
16eae53e56 New setting: honor_ewmh_focus 2013-09-23 11:45:00 +02:00
Bastien Dejean
70c6cada07 Make focus_follows_pointer work on empty desktops 2013-09-22 11:16:06 +02:00