Commit graph

380 commits

Author SHA1 Message Date
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
Guido Cella
0b2f4f213d remove -Werror=declaration-after-statement
wtf is the point of this crap? It makes the code harder to follow,
increases the line count and made me fail compilation a million times.
We shouldn't blindy follow everything about suckless's style.
2020-12-19 19:52:28 +01:00
Guido Cella
ba1540c3d0 remove goto when the border is 0
Rendering 0-dimension rectangles no longer crashes wlroots.
2020-12-19 19:32:16 +01:00
Guido Cella
2eaa8c6de3 remove useless assignment
calloc already initializes ints to 0.
2020-12-19 18:56:42 +01:00
Guido Cella
ee7e8688a7 s/maprequest/mapnotify
This should be consistent with other function names instead of keeping
the X name.
2020-12-19 18:51:22 +01:00
will
aa679c4f29 Added support for natural scrolling 2020-12-19 18:37:10 +01:00
will
4f1e557d3d Added basic tap-to-click for touchpad users 2020-12-19 18:37:10 +01:00
Bonicgamer
679f6493c9 Made scalebox the way sway does it
Scaling a wlr_box without rounding can sometimes make the borders not
connected and nice. I noticed this when setting scale in monrules to 1.2

So I've went and copied what Sway did in desktop/output.c but without
having a second function and now using a random rounding macro I found
on the internet so as to not use round from math.h.
2020-12-19 18:35:25 +01:00
Guido Cella
9c2524b06a s/prev/old
Be consistent with the rest of the code and dwm
2020-12-19 18:31:26 +01:00
Guido Cella
c89de53de3 remove togglefullscreen keybinding
Distribute it as a patch like in dwm since graphical applications
usually provide their own keybinding; I guess it's only for terminals.

Note that even though these commits don't let you open multiple windows
in fullscreen and cycle between them like in dwm, with just
fullscreennotify spawning new windows or changing tag would still exit
fullscreen automatically, but you would have to toggle fullscreen twice
when switching back to the fullscreen window to enter fullscreen again,
so this is better since it avoids that.
2020-12-19 18:23:23 +01:00