Commit Graph

389 Commits

Author SHA1 Message Date
David Donahue
593b7eec3c updated output format for better expansibility and easier parsing 2021-03-01 13:19:25 -06:00
David Donahue
a1e24075d8 Removed unused variable from statusbar 2021-02-08 18:12:24 -06:00
David Donahue
27598bd04a added statusbar update when tags are updated 2021-02-07 01:03:04 -06:00
David Donahue
3868217466 Added interface to output information about tags, the currently selected monitor, and the focused client to a file for use by a status bar 2021-02-07 00:31:01 -06:00
Devin J. Pohly
9c1943ade5 add some explanation of output reconfiguration
Hopefully this will help "future us" understand what's going on.
2021-01-18 15:51:32 -06:00
Devin J. Pohly
a9e1cd4201 remove hacky code from output-management handler
This functionality belongs in updatemons(), where it can hopefully be
written a bit more elegantly.
2021-01-18 15:38:25 -06:00
Devin J. Pohly
ab03282295 commit entire output config, or fail and rollback
The wlr-output-management protocol requires that either all of the
changes from an apply request be applied successfully, in which case a
"succeeded" event is sent, or all of the changes are reverted and a
"failed" event is sent.  As written, this could partially commit
changes, then fail.

Test the changes first (even for an "apply" event), then commit or
rollback as appropriate.
2021-01-18 15:02:15 -06:00
Devin J. Pohly
5eefb51fea use updatemons as handler for output_layout.change
This should end up firing precisely when we need to adjust our geometry,
rather than us guessing about it based on requests.
2021-01-18 14:34:05 -06:00
Devin J. Pohly
c63d4c41ab unify increment style while we're here 2021-01-18 14:14:37 -06:00
Devin J. Pohly
81d35aaccf remove unnecessary variable 2021-01-18 14:12:38 -06:00
Devin J. Pohly
a5210f7d77 cleanup on aisle createmon() 2021-01-18 14:12:00 -06:00
Devin J. Pohly
264be4ebba
Merge pull request #80 from sam-barr/dwl_upstream
Fix Initialization of NetWM Atoms
2021-01-14 20:29:17 -06:00
sam-barr
3d696dfb7d Fix Initialization of NetWM Atoms
Additionally, variables xcursor and xcursor_mgr are only used
when xwayland is defined, so I make the variables declaration
contingent on whether xwayland is being used
2021-01-11 07:47:04 -05:00
Devin J. Pohly
6267593cc2 remove now-unneeded monitor position field 2021-01-06 17:23:35 -05:00
Devin J. Pohly
e8ca8a8ac7 use output layout for dirtomon
No need to track our own order; wlroots has a reasonable default for us
already.
2021-01-06 17:19:44 -05:00
Devin J. Pohly
4bf2923f4e
Merge pull request #72 from Stivvo/output-compile-set
Define monitor's x,y at compile time
2021-01-06 16:44:31 -05:00
Devin J. Pohly
0ff13cf216 remove EGL parameter from backend_autocreate
Tracking with breaking change in swaywm/wlroots#2593.
2021-01-04 13:55:24 -05:00
Stivvo
fa782896f8 Define monitor's x,y at compile time
Replaces the outputOrder patch.

This avoids recalculating positions and allows to arrange monitors in
any order, not just from left to right.

The order in which monitors are defined in config.h still matters but
it's just the order in the list, not the actual position.
2020-12-30 17:07:48 +01:00
Devin J. Pohly
33c36be2fc Revert "Allow toggling the layout before selecting a different one"
This reverts commit 90cc3b1e2c.  Didn't
mean to merge this change.
2020-12-28 15:51:04 -05:00
Devin J. Pohly
313d1f7ecc flesh out cleanup
This is the order of *_destroy calls which resulted in the fewest
errors/leaks detected by Valgrind.  Most of the errors come from the
gbm_allocator code - will have to figure out which destroy call is still
missing.
2020-12-27 20:04:05 -05:00
Devin J. Pohly
7b1b5c75e9 fix segfault in xwayland cursor manager 2020-12-27 14:00:07 -05:00
Devin J. Pohly
7b320a195c macroize event handlers
This was a prime candidate for reducing the verbosity of some of our
code
2020-12-27 13:28:37 -05:00
Devin J. Pohly
ef76c921ed no need to cast NULL to void * 2020-12-25 01:41:09 -05:00
Devin J. Pohly
388c5580cb consolidate some of the ugliness into a separate file
Similar to Linux kernel approach, encapsulate some of the uglier
conditional compilation into inline functions in header files.

The goal is to make dwl.c more attractive to people who embrace the
suckless philosophy - simple, short, hackable, and easy to understand.
We want dwm users to feel comfortable here, not scare them off.  Plus,
if we do this right, the main dwl.c code should require only minimal
changes once XWayland is no longer a necessary evil.

According to `cloc`, this also brings dwl.c down below 2000 lines of
non-blank, non-comment code.
2020-12-25 01:39:07 -05:00
Devin J. Pohly
efe2a97bcf fix build with -DXWAYLAND 2020-12-24 22:39:45 -05:00
Devin J. Pohly
1678b05905 don't call applyexclusive just to return 2020-12-24 22:36:32 -05:00
Devin J. Pohly
57d0760635 let's not alienate the dwm folks
Fix style.
2020-12-24 22:21:00 -05:00
Devin J. Pohly
206427537a Merge updates from guidocella
Thanks so much for helping to keep the project running while life was
crazy!
2020-12-24 21:56:41 -05:00
Devin J. Pohly
cfe7815903
Merge pull request #32 from alex-courtis/24-xwayland-cursor
#24 ensure that xwayland cursor defaults to left_ptr
2020-12-24 21:37:48 -05:00
Devin J. Pohly
7803022d33 simplify ROUND macro 2020-12-24 21:37:21 -05:00
Devin J. Pohly
128c2926e1
Merge pull request #54 from Bonicgamer/swayscalebox
Sway scale_box (rounding)
2020-12-24 21:36:38 -05:00
Devin J. Pohly
c5087d413f
Merge pull request #53 from Stivvo/fullscreen
Fullscreen support
2020-12-24 21:35:57 -05:00
Devin J. Pohly
d94266df91 fix crash on non-libinput pointers (e.g. X11 backend) 2020-12-24 21:15:40 -05:00
Devin J. Pohly
62529e251d
Merge pull request #49 from guidocella/layer-shell
Layer shell
2020-12-24 20:24:14 -05:00
Devin J. Pohly
b6a3891ce6
Merge pull request #62 from Java-boi/master
Added basic tap-to-click for touchpad users
2020-12-24 18:55:06 -05:00
Stivvo
d21d5ee262 Change fullscreen policies
When a new client is spawned, fullscreen isn't disabled for all clients
in that monitor any more.

Instead, all fullscreen clients are kept fullscreen, while other clients
spawn in the background.

When fullscreen is disabled, all clients are rearranged.

This is made to make dwl more flexible allowing multiple fullscreen
clients at the same time, have floating clients on top of a fullscreen
one and let stuff happen without quitting fullscreen, like many other
WMs and DEs.
2020-12-24 21:05:34 +01:00
Stivvo
707c1710b7 quitallfullscreen() even when enabling fullscreen
Disable fullscreen on all visible clients in that monitor also before
enabling it on another client.

quitallfullscreen() is reintroduced becouse is now more useful

set c->isfullscreen later to avoid making quitallfullscreen() disable
fullscreen on the current client
2020-12-24 12:29:44 +01:00
Stivvo
86ba4c8526 Remove goto render (easier merge) 2020-12-24 00:34:33 +01:00
Guido Cella
33e8a3f1f3 update comments and remove debugging printf 2020-12-21 11:22:04 +01:00
Stivvo
5668c61616 Define monitor order with monrules[]
The order in which monitors are defined in monrules[] actually matters.

Monotors that aren't configured in monrules[], it will always be the
leftmost.
2020-12-21 11:12:44 +01:00
Guido Cella
cf7c5eae21 don't reset the cursor image
...in internal calls to restore pointer focus. Necessary for the
unclutter patch, and there's no harm in avoiding this call even in
mainline; might prevents issues in same edge cases.
2020-12-21 10:28:09 +01:00
Guido Cella
499cb2c2b6 say TODO
just wtf is XXX supposed to be? It sounds like a pornographic thing.
2020-12-20 18:19:49 +01:00
Guido Cella
5ed227384b rename drw
It's impossible to understand that this stands from drawable if you're
not familiar with dwm's code.
2020-12-20 18:19:43 +01:00
Guido Cella
b161b5d8f4 don't notify of activity
...or update selmon when we just want to restore pointer focus.
2020-12-20 16:04:13 +01:00
Guido Cella
13c7e039bb deactivate the focused client on overlay focus 2020-12-20 15:55:52 +01:00
Guido Cella
a571ea465c replace shouldfocusclients with checking old
And don't activate clients while an overlay is focused.
2020-12-20 15:46:31 +01:00
Guido Cella
39946e07f2 fix keyboard focus with overlays
Don't let internal calls to motionnotify(0) meant to update the pointer
focus from maplayersurfacenotify and destroylayersurfacenotify also
shift the keyboard focus to the surface under the cursor with
sloppyfocus.
2020-12-20 15:46:31 +01:00
Guido Cella
f80f08848b ensure that xwayland cursor defaults to left_ptr
Don't show an X cursor when closing an Xwayland window or with certain
dropdowns.

Based on https://github.com/djpohly/dwl/pull/32
2020-12-20 14:57:41 +01:00
Guido Cella
444a5f9dec enable adaptive sync
The comment in this function's declaration says the backend is free to
ignore this setting, so maybe there's no need to make it configurable?
2020-12-20 14:57:41 +01:00
Guido Cella
6b47e2bb62 use bool
Because it's 2020. Passing integers to wlroots variables and functions
with bool in their signature is silly.
2020-12-20 14:57:39 +01:00