Commit graph

1322 commits

Author SHA1 Message Date
Bastien Dejean
7c52a2bd12 Disable enter notify events in cancel_presel
Fixes #461.
2016-04-20 16:59:26 +02:00
Bastien Dejean
4bf21bdf93 Honor FFP in initialize_presel_feedback 2016-04-19 20:55:19 +02:00
Bastien Dejean
be7376964c Add node descriptor: pointed
Fixes #456.
2016-04-19 20:49:22 +02:00
Bastien Dejean
e70f826c94 Consolidate focus_follows_pointer
Fixes #454.
2016-04-18 13:54:00 +02:00
Campbell Barton
4a329419fa Fix using uninitialized value
Currently with bspwm, the urgent member is read before being set.

Valgrind output:

```
==17037== Conditional jump or move depends on uninitialised value(s)
==17037==    at 0x409C06: focus_node (tree.c:503)
==17037==    by 0x40FF89: enter_notify (events.c:355)
==17037==    by 0x40F3C2: handle_event (events.c:61)
==17037==    by 0x404406: main (bspwm.c:180)
==17037==  Uninitialised value was created by a heap allocation
==17037==    at 0x4C2ABD0: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==17037==    by 0x40A0A0: make_client (tree.c:619)
==17037==    by 0x4117E0: manage_window (window.c:131)
==17037==    by 0x41142A: schedule_window (window.c:67)
==17037==    by 0x4124D2: adopt_orphans (window.c:391)
==17037==    by 0x417FC9: cmd_wm (messages.c:1132)
==17037==    by 0x413DAA: process_message (messages.c:100)
==17037==    by 0x413C22: handle_message (messages.c:81)
==17037==    by 0x4043A2: main (bspwm.c:170)
```
2016-04-18 14:36:02 +10:00
Bastien Dejean
0cfe1f344c Only alter the visibility of the shown windows 2016-04-16 21:15:45 +02:00
Bastien Dejean
83a54fea51 Restore/dump monitors and desktops pointers as IDs 2016-04-16 20:50:53 +02:00
Bastien Dejean
fefc9953f5 Catch some of the invalid queries 2016-04-16 18:43:42 +02:00
Bastien Dejean
3a9f8910d7 Update EWMH hidden state 2016-04-16 18:22:49 +02:00
Bastien Dejean
331cc9e2d5 Add node flag: hidden
Fixes #229.
2016-04-16 18:13:31 +02:00
Nathan Isom
828c93fb29 leaf_monocle --> single_monocle completion. 2016-04-15 19:20:23 -05: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
c997408920 Fix infinite loop in closest_monitor 2016-04-15 17:53:21 +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
Bastien Dejean
e2ea3c0254 Rely on precomputed rectangles whenever possible 2016-04-15 16:34:45 +02:00
Bastien Dejean
71a2fb91b0 Allow multiple constraints for the *query* domain
Example:
    bspc query -N -d '^3' -n .window

The above command will list the IDs of the windows of the third desktop.
2016-04-14 23:15:58 +02:00
Bastien Dejean
789cb8a504 Don't restrict node --flag to windows
This fixes a regression introduced by e8aa679.
2016-04-14 16:56:14 +02:00
Campbell Barton
73e402e49a Fix missing NULL check
could crash when windows were unmapped within a script.
2016-04-12 06:09:15 +10:00
Bastien Dejean
0042db16f4 Only grab what needs to be grabbed 2016-04-11 20:26:48 +02:00
Bastien Dejean
867b427356 Use the proper type for the return value of getopt 2016-04-11 18:37:49 +02:00
Bastien Dejean
0a09f5e4fa Don't return a freed node from insert_node 2016-04-11 18:13:05 +02:00
Bastien Dejean
5d01b48a04 Remove hard-wired node DIR fallback 2016-04-11 17:58:05 +02:00
Bastien Dejean
74f78ccd17 Remove obsolete descriptor 2016-04-11 17:51:24 +02:00
Campbell Barton
3eca593ef9 Cleanup: indentation
Mixing tabs/spaces
2016-04-11 07:27:28 +10:00
Bastien Dejean
56b543ef2d Add getter for pointer_action<n> 2016-04-10 22:33:02 +02:00
Bastien Dejean
265aa0ecdb Mention pointer_action<n> where it makes sense 2016-04-10 22:24:25 +02:00
Bastien Dejean
c6c52e240e Don't needlessly ungrab/grab the buttons 2016-04-10 22:12:22 +02: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
6f0bfe9ce2 Fix default ICCCM input hint value 2016-04-10 14:34:24 +02:00
Bastien Dejean
1ff7191130 Fix typo 2016-04-09 14:08:54 +02:00
Bastien Dejean
12edac86fa Reinstate built-in pointer bindings 2016-04-07 18:08:32 +02:00
Bastien Dejean
e1b5f77ef1 Fix ID format in test window 2016-03-29 12:33:28 +02:00
Bastien Dejean
3e60b44c29 Only allow null nodes for the PATH descriptor
Fixes #434.
2016-03-27 10:48:57 +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
eb209d83bf Update domain list in Bash and ZSH completions 2016-03-23 11:42:33 +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
ebad909ed1 Fail verbosely
Along the way, we also fixed the handling of the `*_padding`,
`window_gap` and `border_width` settings. The previous behavior was the
result of a bad decision (9fed780), as a response to #141. Many issues
followed: #143, #158, #260, etc. We now handle those settings as
intuitively as possible.

We also fixed a potential segfault in `cmd_node`, triggered by `bspc
node -d`[sic].

Fixes #402 #252.
2016-03-21 14:28:04 +01:00
Bastien Dejean
1e3b13465b Fix handling of ID/name frictions
It seems that `resource_base_id` isn't the lower bound of the set of
possible IDs.
2016-03-20 10:38:11 +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
212442e162 Don't try to print pointers as strings 2016-03-16 10:26:38 +01:00
Bastien Dejean
6b8719e4a2 Introduce VERCMD in Makefile
This is useful when the author has to make a release commit, in which
case `make doc` is required, but, because the tag doesn't exist yet, the
output of VERCMD won't be what we want. Therefore, we need to override
VERCMD for the *doc* target: `make VERCMD=false doc`.
2016-03-16 10:13:45 +01:00
Bastien Dejean
8356bfb88b Fix VERSION definition in Makefile
Fixes #414
2016-03-15 17:06:25 +01:00
Bastien Dejean
fb505a1b40 Version 0.9.1 2016-03-15 10:14:20 +01:00
Bastien Dejean
4b538bca86 Update the stacking list when removing a node
Because `stack` isn't called in `focus_node`, when `n == NULL`.
2016-02-26 22:14:26 +01:00
Bastien Dejean
15cdc71573 Fix gcc warning regarding uninitialized variable 2016-02-26 22:08:59 +01:00
Bastien Dejean
7e5c4f25c3 Initially center the pointer on mon
Fixes #407.
2016-02-26 15:28:42 +01:00
Bastien Dejean
c895ef0f0e Extract geometric functions from helpers.c 2016-02-26 14:22:03 +01:00
Bastien Dejean
87a89ffeac Don't change the index of the primary monitor 2016-02-24 10:55:24 +01:00
Bastien Dejean
dbaa2b377a Sort monitors by natural visual hierarchy
Fixes #405.
2016-02-23 21:19:12 +01:00