Coder Social home page Coder Social logo

djpohly / dwl Goto Github PK

View Code? Open in Web Editor NEW
1.9K 43.0 287.0 1.09 MB

dwm for Wayland - ARCHIVE: development has moved to Codeberg

Home Page: https://codeberg.org/dwl/dwl

License: Other

Makefile 2.39% C 94.74% Roff 2.86%
wayland-compositor wlroots tiling wayland compositor

dwl's Introduction

dwl - dwm for Wayland

⚠️ Migrated to Codeberg

This project has migrated to Codeberg.

Join us on our IRC channel: #dwl on Libera Chat
Or on our Discord server.

dwl is a compact, hackable compositor for Wayland based on wlroots. It is intended to fill the same space in the Wayland world that dwm does in X11, primarily in terms of philosophy, and secondarily in terms of functionality. Like dwm, dwl is:

  • Easy to understand, hack on, and extend with patches
  • One C source file (or a very small number) configurable via config.h
  • Limited to 2200 SLOC to promote hackability
  • Tied to as few external dependencies as possible

dwl is not meant to provide every feature under the sun. Instead, like dwm, it sticks to features which are necessary, simple, and straightforward to implement given the base on which it is built. Implemented default features are:

  • Any features provided by dwm/Xlib: simple window borders, tags, keybindings, client rules, mouse move/resize. Providing a built-in status bar is an exception to this goal, to avoid dependencies on font rendering and/or drawing libraries when an external bar could work well.
  • Configurable multi-monitor layout support, including position and rotation
  • Configurable HiDPI/multi-DPI support
  • Idle-inhibit protocol which lets applications such as mpv disable idle monitoring
  • Provide information to external status bars via stdout/stdin
  • Urgency hints via xdg-activate protocol
  • Support screen lockers via ext-session-lock-v1 protocol
  • Various Wayland protocols
  • XWayland support as provided by wlroots (can be enabled in config.mk)
  • Zero flickering - Wayland users naturally expect that "every frame is perfect"
  • Layer shell popups (used by Waybar)
  • Damage tracking provided by scenegraph API

Features under consideration (possibly as patches) are:

  • Protocols made trivial by wlroots
  • Implement the text-input and input-method protocols to support IME once ibus implements input-method v2 (see ibus/ibus#2256 and #235)

Feature non-goals for the main codebase include:

  • Client-side decoration (any more than is necessary to tell the clients not to)
  • Client-initiated window management, such as move, resize, and close, which can be done through the compositor
  • Animations and visual effects

Building dwl

dwl has the following dependencies:

libinput
wayland
wlroots (compiled with the libinput backend)
xkbcommon
wayland-protocols (compile-time only)
pkg-config (compile-time only)

If you enable X11 support:

libxcb
libxcb-wm
wlroots (compiled with X11 support)
Xwayland (runtime only)

Simply install these (and their -devel versions if your distro has separate development packages) and run make. If you wish to build against a Git version of wlroots, check out the wlroots-next branch.

To enable XWayland, you should uncomment its flags in config.mk.

Configuration

All configuration is done by editing config.h and recompiling, in the same manner as dwm. There is no way to separately restart the window manager in Wayland without restarting the entire display server, so any changes will take effect the next time dwl is executed.

As in the dwm community, we encourage users to share patches they have created. Check out the patches page on our wiki!

Running dwl

dwl can be run on any of the backends supported by wlroots. This means you can run it as a separate window inside either an X11 or Wayland session, as well as directly from a VT console. Depending on your distro's setup, you may need to add your user to the video and input groups before you can run dwl on a VT. If you are using elogind or systemd-logind you need to install polkit; otherwise you need to add yourself in the seat group and enable/start the seatd daemon.

When dwl is run with no arguments, it will launch the server and begin handling any shortcuts configured in config.h. There is no status bar or other decoration initially; these are instead clients that can be run within the Wayland session. Do note that the background color is black.

If you would like to run a script or command automatically at startup, you can specify the command using the -s option. This command will be executed as a shell command using /bin/sh -c. It serves a similar function to .xinitrc, but differs in that the display server will not shut down when this process terminates. Instead, dwl will send this process a SIGTERM at shutdown and wait for it to terminate (if it hasn't already). This makes it ideal for execing into a user service manager like s6, anopa, runit, or systemd --user.

Note: The -s command is run as a child process of dwl, which means that it does not have the ability to affect the environment of dwl or of any processes that it spawns. If you need to set environment variables that affect the entire dwl session, these must be set prior to running dwl. For example, Wayland requires a valid XDG_RUNTIME_DIR, which is usually set up by a session manager such as elogind or systemd-logind. If your system doesn't do this automatically, you will need to configure it prior to launching dwl, e.g.:

export XDG_RUNTIME_DIR=/tmp/xdg-runtime-$(id -u)
mkdir -p $XDG_RUNTIME_DIR
dwl

Status information

Information about selected layouts, current window title, app-id, and selected/occupied/urgent tags is written to the stdin of the -s command (see the printstatus() function for details). This information can be used to populate an external status bar with a script that parses the information. Failing to read this information will cause dwl to block, so if you do want to run a startup command that does not consume the status information, you can close standard input with the <&- shell redirection, for example:

dwl -s 'foot --server <&-'

If your startup command is a shell script, you can achieve the same inside the script with the line

exec <&-

To get a list of status bars that work with dwl consult our wiki.

Replacements for X applications

You can find a list of useful resources on our wiki.

Acknowledgements

dwl began by extending the TinyWL example provided (CC0) by the sway/wlroots developers. This was made possible in many cases by looking at how sway accomplished something, then trying to do the same in as suckless a way as possible.

Many thanks to suckless.org and the dwm developers and community for the inspiration, and to the various contributors to the project, including:

  • Alexander Courtis for the XWayland implementation
  • Guido Cella for the layer-shell protocol implementation, patch maintenance, and for helping to keep the project running
  • Stivvo for output management and fullscreen support, and patch maintenance

dwl's People

Contributors

alex-courtis avatar bencollerson avatar benjarg avatar bonicgamer avatar dimkr avatar djpohly avatar dm1tz avatar drdonahue avatar fbushstone avatar gan-of-culture avatar guidocella avatar humm42 avatar keating950 avatar krypciak avatar link2xt avatar mchackorg avatar meutraa avatar nikitaivanovv avatar noocsharp avatar oyren avatar palanixyt avatar raphaelr avatar richardipsum avatar sevz17 avatar shua avatar shugyousha avatar ss7m avatar stivvo avatar xi avatar yveszoundi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dwl's Issues

[question] Wallpaper support.

I know dwl is a tiling compositor and most of the times the apps will cover the background unless they are transparent, but I'd like to ask whether there will be a way to have a wallpaper in the future (probably with a third party program like wallutils) or it's a non-goal?

Is the version of wlroots required for dwl too old?

I am using wlroots 0.12.0

$ make

cc -g -Wall -Wextra -Werror -Wno-unused-parameter -Wno-sign-compare -Wno-unused-function -Wno-unused-variable -Wdeclaration-after-statement -I. -DWLR_USE_UNSTABLE -std=c99 -I/usr/include/libdrm -I/usr/include/pixman-1 -I/usr/include/elogind -c -o dwl.o dwl.c
dwl.c: In function ‘keypress’:
dwl.c:1287:19: error: comparison between ‘enum wlr_key_state’ and ‘enum wl_keyboard_key_state’ [-Werror=enum-compare]
1287 | if (event->state == WL_KEYBOARD_KEY_STATE_PRESSED)
| ^~
dwl.c: In function ‘setup’:
dwl.c:1998:18: error: too few arguments to function ‘wlr_backend_autocreate’
1998 | if (!(backend = wlr_backend_autocreate(dpy)))
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from dwl.c:15:
/usr/include/wlr/backend.h:43:21: note: declared here
43 | struct wlr_backend *wlr_backend_autocreate(struct wl_display *display,
| ^~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [: dwl.o] Error 1

Crashes when opening clients

I have experienced some crashes when opening clients (seems to happen more often if firefox is open). sadly 4 out of 5 times i was sending errors to /dev/null (that's not very helpful) but i recorded the last one, here it is:
dwl: types/xdg_shell/wlr_xdg_surface.c:15: wlr_xdg_surface_from_wlr_surface: Assertion `wlr_surface_is_xdg_surface(surface)' failed. thread 'thread 'mainmain' panicked at '' panicked at 'failed to read wayland events: Broken pipe (os error 32)failed to read wayland events: Broken pipe (os error 32)', ', <::std::macros::panic macros><::std::macros::panic macros>::55:6 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace thread ':main6 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ' panicked at 'failed to read wayland events: Broken pipe (os error 32)', <::std::macros::panic macros>:5:6 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace thread 'main' panicked at 'failed to read wayland events: Broken pipe (os error 32)', <::std::macros::panic macros>:5:6 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I will run it with RUST_BACKTRACE enabled as suggested, is there anything else I should provide?
This is on arch linux, wlroots version 0.10.1-1 and wayland-protocols version 1.20-1

Support for unstable text_input and input_method Wayland protocols

These unstable protocols allow input methods (IMEs) to function without relying on some non-standardized method of communication (dbus etc).

Support for them has been added to Sway ( swaywm/sway#4740 ) and in my opinion the functionality provided by those protocols is fundamental enough that they should be supported in dwl as well.

If you agree, I can start working on porting support for those two protocols from Sway to dwl (probably will take a while but I will try...).

`WLR_KEY_PRESSED` undeclared

Alright, it's probably not an issue , but I am curious about the proper way to compile dwl on non-systemd distro (I use devuan). I tried more than twice and end up error. Surprisingly , when I use compiled binary (I compiled it on Arch) on my devuan , it works. Any advice? Thanks.
P.s : the error I faced was 'WLR_KEY_PRESSED' undeclared blablabla (I'm sorry if it's not too detail).

option to set scaling

please add option to set display scaling, im using 4k 27" monitor. it would be nice to have the option to set display scaling.
2021-01-30T19:28:12,939401707+02:00

Not building

Hello its not building on master branch with following error
"dwl.c:2018:18: error: too few arguments to function ‘wlr_backend_autocreate’
2018 | if (!(backend = wlr_backend_autocreate(dpy)))"

Dwl fails at setup_tty on Alpine with freeze/endless loop

I am not sure at all, how to debug Musl or Kernel. I installed musl-dev and musl-dbg without fixing the missing symbol problem.
Do you have any advice on that or any idea about the bug?

The error happens in function setup_tty in wlroots code backend/session/direct.c

204		if (ioctl(fd, KDSKBMODE, K_OFF)) {
209		if (ioctl(fd, KDSETMODE, KD_GRAPHICS)) {

The logs are attached. This may be related.
dwl_gdb_moreInfo.txt
dwl_gdb.txt

This time I have all dependencies installed as the following packages (probably some not needed) and wlroot master from github:

kwayland-server kwayland-server-dev wayland-dev wayland-libs-server cmake
ffmpeg-libs ffmpeg-dev
mesa-dev
meson wayland wayland-protocols wayland-libs-egl gegl-dev gegl mesa-egl
libdrm libdrm-dev mesa-gbm libinput libinput-dev libinput-libs xf86-input-libinput libxkbcommon libxkbcommon-dev libxkbcommon-x11 libxkbcommon-static udev eudev-libs eudev-dev
pixman pixman-dev pixman-static xcb-util xcb-util-errors xcb-util-errrors-dev libxcb libxcb-dev
libx11-dev xcb-util-wm xcb-util-wm-dev xcb-util-image xcb-util-image-dev

Make CSDs optional/hidden by default

Hi, just trying this out.

I've noticed that Wayland applications launched inside dwl have client side decorations. Sway disables these by default I think as they aren't really needed for tiling window managers.

031051-03-06-2020

Segfault of current master on Alpine Linux

After installing all necessary packages and building wlroots from master (commit 9feeb2738dfc5a2b07a817938cef9d553d0a26ee) (missing elogind and xbc-error and systemd) and dwl (commit 0816b33) I got the following segfault:

gdb log

Starting program: /home/user/git/dwl/dwl
[Detaching after fork from child process 5287]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7ebe4b3 in wlr_backend_get_renderer (backend=0x0) at ../backend/backend.c:54
54 if (backend->impl->get_renderer) {
#0 0x00007ffff7ebe4b3 in wlr_backend_get_renderer (backend=0x0) at ../backend/backend.c:54
#1 0x000055555555c36b in setup () at dwl.c:1478
#2 0x000055555555cfb7 in main (argc=1, argv=0x7fffffffeca8) at dwl.c:1942

Do you plan to do any CI with testing/fuzzing for this nice little program?

Implementing support for external status bars

First of all: Really cool project you started here. This will probably be all i need to switch to wayland.

I would really like to contribute, if i find the timei, and i would like to start working on support for external status bars.
So the question is, do you already have started something in this regard and what are your plans for the exact implementation?
Also, i don't know if this is the right place to ask this question, so feel free to point me to something else.

Bar support without Pango

First I have to say thanks for this great project! I saw that someone else replaced pango with fcft+fontconfig in a swaywm fork though it still does depend on the BSD/FTL licensed freetype: https://codeberg.org/dnkl/sway

Other projects replacing pango:

https://codeberg.org/dnkl/fuzzel
https://codeberg.org/dnkl/yambar
https://codeberg.org/dnkl/fnott
https://codeberg.org/dnkl/foot

All pretty minimal in dependencies for all the features they have, still I understand why it might be better for this project to not having any text graphic lib dependencies at all. The lack of explicit cairo and pango dependencies are actually what first attracted me to dwl!

Nevertheless, they are perhaps external projects which can be targets for compatibility as bars and app launchers etc. in dwl?

Unrelated, but I would totally love to see the ability to make screenshots in dwl :-)

Questions regarding dwl

Forgive me for my lack of understanding but I am a bit confused, is this supposed to be a compositor or a WM? I thought dwm is a WM and dwl is supposed to mimic dwm but for wayland, so how come dwl refers itself to be a compact, hackable compositor for Wayland based on wlroots.?

Touchpad tap-to-click

Support tapping on a touchpad to generate mouse button events. This is noticeable when running on a VT (X will have translated the event already).

Crashes when trying to fullscreen nonexistent window

Behavior

When you press the keybind to fullscreen a window, but there is no window in focus (i.e. the workspace is empty), dwl crashes.

Expected behavior

It should just ignore the keybind if there is no window.

Reduce monitor rendering

DWL appears to be redrawing the framebuffer on every refresh. On my test NixOS VM running under libvirt with a default configuration, each of the 8 cores has ~65% CPU usage. With this patch applied, the CPU usage goes to near 0 when there are no clients.

diff --git a/dwl.c b/dwl.c
index c09f598..bb1315a 100644
--- a/dwl.c
+++ b/dwl.c
@@ -1759,7 +1759,7 @@ void
 rendermon(struct wl_listener *listener, void *data)
 {
 	Client *c;
-	int render = 1;
+	int render = 0;

 	/* This function is called every time an output is ready to display a frame,
 	 * generally at the output's refresh rate (e.g. 60Hz). */
@@ -1770,6 +1770,7 @@ rendermon(struct wl_listener *listener, void *data)

 	/* Do not render if any XDG clients have an outstanding resize. */
 	wl_list_for_each(c, &stack, slink) {
+		render = 1;
 		if (c->resize) {
 			wlr_surface_send_frame_done(client_surface(c), &now);
 			render = 0;

This is not a pull request, just a test case to demonstrate the issue. This very quick and dirty patch disables drawing unless there is a client.

MPV freezes DWL

How to reproduce:
Open a video with mpv and try to switch to other tag and try to go back.

What happens:
dwl becomes unresponsive for some time. It happens even if the video is paused. I can close the compositor though.

Platform:
Manjaro-arm unstable aarch64 Pinebook Pro (RK3399).

symbol lookup error: dwl: undefined sysmbol: wlr_xwayland_create

I'm sorry to bother again, dwl is compiled succesfully (with / without xwayland flag), but when I launch one with xwayland it get error "symbol lookup error: dwl: undefined sysmbol: wlr_xwayland_create", I think something messup with wlroots or other reasons. Without xwayland work greats. Any advice? Thanks.

High CPU usage with kworker/u16:0+events_unbound

Trying out dwl, but noticed that kworker/u16:0+events_unbound is eating up the cycles.
top reports 50% cpu usage on a two-core laptop.
When connecting an external monitor, this goes up to two kernel processes, each in a loop.
If this helps, I am running the nouveau drivers.

Dropping into the debugger, it appears that this is happening to the server event loop:

(gdb) where
#0  0x00007f95c60e2f3e in epoll_wait () at /usr/lib/libc.so.6
#1  0x00007f95c621ff2e in wl_event_loop_dispatch () at /usr/lib/libwayland-server.so.0
#2  0x00007f95c621e4e7 in wl_display_run () at /usr/lib/libwayland-server.so.0
#3  0x0000559104873e7e in run (startup_cmd=0x0) at dwl.c:1317
#4  0x0000559104875000 in main (argc=1, argv=0x7ffdf1e05108) at dwl.c:1904

I don't know how to proceed from here.

Thank you!

TTY display failure

My setup --
5.9.10-artix1-1 : dwl : st

My problem --
Running dwl from an existing wayland comp session works just fine (in my case sway). But running from TTY throws the very unhelpful wlroots error can't open display. At least I assume it's wlroots. In short, from TTY I can get to the dwl gray screen, but no terminal, no dmenu, alt-shift-Q to end my misery.

wlroots-nosystemd-minimal-git doesn't seem stable, so I use wlroots-git as directed in #9, but with a similar problem to ntegan's original lack of terminal handling with alacritty in my own case with st...

At this point, wterm has been all but abandoned (see maintainer's comment in majestrate/wterm#23), which leaves me with very few wayland-only terminal emulators worth pursuing.

I've tried a few different iterations of xwayland, but that may be unrelated.
Is there a reason st or other display would be handled fine within a virtual display but not from TTY?

Atomic layout updates (eliminate flicker on window resize)

When the window layout changes, dwl should not render a frame with the new layout until all of the visible windows can be drawn at their new sizes.

Currently it is possible to draw frames in which the size/position/visibility of windows are in an intermediate state. For example, when a new tiled window is mapped, the other tiled windows may commit their new-sized buffer and be redrawn in their updated positions before the new window appears, showing the background through a "hole," or a window which needs to be sized down will be drawn in its new position before its buffer changes size, overlapping with other windows.

The solution doesn't seem to be short and obvious, so if there is not a simple and fully correct way to do this, then let's aim for simple and sufficient before complex and fully correct.

Building on archlinux requires wlroots-git

Couldn't build on archlinux, wlroots and wayland-protocols installed.
Had to

find . | xargs -I{} sed -i 's/wlr_seat_pointer_notify_clear_focus/wlr_seat_pointer_clear_focus/g' {}

to fix this error

ntegan@tpp51 ~/dwl (git)-[master] % make
cp config.def.h config.h
/usr/bin/wayland-scanner server-header \
        //usr/share/wayland-protocols/stable/xdg-shell/xdg-shell.xml xdg-shell-protocol.h
cc -g -Wall -Wextra -Werror -Wno-unused-parameter -Wno-sign-compare -I. -DWLR_USE_UNSTABLE -std=c99 -Werror=declaration-after-statement -I/usr/include/libdrm -I/usr/include/pixman-1      -c -o dwl.o dwl.c
dwl.c: In function ‘focusclient’:
dwl.c:601:3: error: implicit declaration of function ‘wlr_seat_pointer_notify_clear_focus’; did you mean ‘wlr_seat_pointer_clear_focus’? [-Werror=implicit-function-declaration]
  601 |   wlr_seat_pointer_notify_clear_focus(seat);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |   wlr_seat_pointer_clear_focus
cc1: all warnings being treated as errors
make: *** [<builtin>: dwl.o] Error 1

X11 Dropdown Menus Do Not Retain Focus

Dropdowns lose focus and disappear when they are over another window.

Reproduce:

  • Open chromium to the left of another window
  • Click the menu
  • Hover over history item
  • Move the mouse over the history menu which is over the other application

(I'd label this but do not have permissions)

Patches?

So I've been working on pointer constraints and I'm now able to play Minecraft without the camera freaking out, but now I don't really know what to do.

Obviously pointer constraints shouldn't come with Dwl by default since 90% of applications don't need it (Or at least that's what I think). But then again, someone else might want pointer constraints without having to do any work.

So my question is: Where should I put the work that I did so other people can benefit from/improve it?

Edit: To clarify, I mean like a unified place to put patches. Kinda like how Dwm has a patches tab.

More precise enter/leave for clients

Client surfaces should be sent enter/leave events when they enter and leave an output (monitor) in terms of being visible on that output.

Currently, these events are sent only when the client changes its "home" output c->mon, regardless of whether its position overlaps with other outputs as well. This is sufficient in many common cases, but if there is a simple way to track more accurately which outputs a client is visible on, that would be an improvement.

sway handles this by attaching a resizable array of outputs to each container. If we could put a reasonable upper bound (of, say, 32 or 64) on the number of supported outputs and give each output an index, then we could easily use a bitset instead.

Use cage for X11 clients

Using cage to run X11 clients could have a lot of benefits - cleaner code, more control over client isolation, and so on.

dwl build fails on musl

Hi,
I am on a musl based distro.
The build fails witht the following:

/downloads/dwl$ ➜  make
cc -O3 -pipe -march=native -Werror -I. -DWLR_USE_UNSTABLE -I/usr/include/libdrm -I/usr/include/pixman-1      -c -o dwl.o dwl.c
In file included from dwl.c:11:
/usr/include/sys/signal.h:1:2: error: #warning redirecting incorrect #include <sys/signal.h> to <signal.h> [-Werror=cpp]
    1 | #warning redirecting incorrect #include <sys/signal.h> to <signal.h>
      |  ^~~~~~~
cc1: all warnings being treated as errors
make: *** [<builtin>: dwl.o] Error 1

Greetings.

Edit: This can be fixed by changing #include <sys/signal.h> to #include <signal.h> in dwl.c

X11 "X" cursor visible when it shouldn't be

When running Firefox in XWayland, the mouse cursor turns into the X11 "X" cursor when a second-level menu such as View->Zoom is open. Quitting the program also turns the mouse to this cursor until the mouse is moved again.

AFAIK this cursor isn't ever requested by Firefox and so shouldn't be showing up.

(Note: XC_X_cursor has the value 0. Might be relevant, might not.)

Segmentation Fault on Arch Linux

I'm getting a segmentation fault when running dwl on Arch Linux. I've never used dwl or wayland before, and was just exploring some options on my new PC. Any help is appreciated. Thanks.

Relevant software versions:

[caleb@stewie-ryzen ~]$ yay -Qs wlroots-git
local/wlroots-git 0.12.0.r247.g32c30481-1
    Modular Wayland compositor library
[caleb@stewie-ryzen ~]$ yay -Qs wayland-protocols
local/wayland-protocols 1.20-1
    Specifications of extended Wayland protocols

The backtrace from the generated core file:

#0  0x0000000000000000 in  ()
#1  0x00007f7097e081f5 in  () at /usr/lib/dri/radeonsi_dri.so
#2  0x00007f7097e082e8 in  () at /usr/lib/dri/radeonsi_dri.so
#3  0x00007f7099f69c2c in  () at /usr/lib/libgbm.so.1
#4  0x00007f7099f6d290 in gbm_bo_create_with_modifiers () at /usr/lib/libgbm.so.1
#5  0x00007f709a259770 in create_buffer (format=0x55c05f7bf740, height=256, width=256, alloc=0x55c05f0e3f60)
    at ../render/gbm_allocator.c:25
#6  allocator_create_buffer (wlr_alloc=0x55c05f0e3f60, width=256, height=256, format=0x55c05f7bf740)
    at ../render/gbm_allocator.c:195
#7  0x00007f709a259e35 in wlr_swapchain_acquire (swapchain=0x55c05f7be310, age=age@entry=0x0)
    at ../render/swapchain.c:106
#8  0x00007f709a263954 in drm_surface_make_current
    (surf=surf@entry=0x55c05e9eedd8, buffer_age=buffer_age@entry=0x0) at ../backend/drm/renderer.c:110
#9  0x00007f709a261546 in drm_connector_set_cursor
    (output=0x55c05f5a6cf0, texture=0x55c05f63d510, scale=1, transform=WL_OUTPUT_TRANSFORM_NORMAL, hotspot_x=<optimized out>, hotspot_y=<optimized out>, update_texture=<optimized out>) at ../backend/drm/drm.c:936
#10 0x00007f709a29434c in output_cursor_attempt_hardware (cursor=cursor@entry=0x55c05f7bfde0)
    at ../types/wlr_output.c:1013
#11 0x00007f709a295dc5 in wlr_output_cursor_set_image
    (cursor=0x55c05f7bfde0, pixels=pixels@entry=0x55c05f5c1100 "", stride=stride@entry=96, width=width@entry=24, height=height@entry=24, hotspot_x=hotspot_x@entry=4, hotspot_y=4) at ../types/wlr_output.c:1054
#12 0x00007f709a286028 in wlr_cursor_set_image
    (cur=cur@entry=0x55c05f204c10, pixels=0x55c05f5c1100 "", stride=96, width=24, height=24, hotspot_x=4, hotspot_y=4, scale=1) at ../types/wlr_cursor.c:340
#13 0x00007f709a2a05c3 in wlr_xcursor_manager_set_cursor_image
    (manager=0x55c05f1f33d0, name=0x55c05ce4201f "left_ptr", cursor=0x55c05f204c10)
    at ../types/wlr_xcursor_manager.c:80
#14 0x000055c05ce3d44a in  ()
#15 0x00007f7099fe9152 in __libc_start_main () at /usr/lib/libc.so.6
#16 0x000055c05ce3d62e in  ()

Core Dump:
core-dwl.1683264.stewie-ryzen.1610830210.gz

make in debian testing

make
cc -g -Wall -Wextra -Werror -Wno-unused-parameter -Wno-sign-compare -Wno-unused-function -Wno-unused-variable -Wdeclaration-after-statement -DXWAYLAND -I. -DWLR_USE_UNSTABLE -std=c99 -I/usr/include/libdrm -I/usr/include/pixman-1 -c -o dwl.o dwl.c
dwl.c: In function ‘keypress’:
dwl.c:1310:19: error: comparison between ‘enum wlr_key_state’ and ‘enum wl_keyboard_key_state’ [-Werror=enum-compare]
1310 | if (event->state == WL_KEYBOARD_KEY_STATE_PRESSED)
| ^~
cc1: all warnings being treated as errors
make: *** [: dwl.o] Error 1

XWayland compilation errors

Compiling dwl with XWayland support results in lots of compilation errors. I haven't taken the time to look through all of these, but from what I've seen it looks like certain types, variables, and functions are undeclared.

I haven't taken a look through all the files yet but I'll get around to it.

Here is the log: error.log

I'm curious to know whether dwl relies on some up-to-date version of wlroots, because earlier today I got compilation errors in the main code that I resolved by installing wlroots-git from the AUR.
I'm on Artix if that helps.

Question: HiDPI

So a reason i want to try out wayland (with dwm ofcourse), is because of a problem that i have with X11. Simply, i cannot adjust different dpi values for different monitors (i have a 4k 35" monitor and a 1080p 24" monitor), which makes using dwm with X11 almost impossible on my other montior. I've heard that with wayland this is not the case, you can change the dpi values for different monitors. is this true? if so, how do i do it? i cannot find any resource online about it, i've just heard it on the gentoo forums.

DWL creates alacritty zombies

Every closed alacritty becomes a zombie. I'm not sure whether it happens to other programs which are children of dwl.
Architecture: Pinebook Pro (aarch64) Manjaro-arm.

Adaptive Sync Support

wl-roots now has adaptive sync support built-in. wlr_output_enable_adaptive_sync, documented here, should enable this.

The filepicker in firefox, vimb or libreoffice does not show

It acts like there is a dialogue above (the app freezes until I hit Esc), but nothing gets displayed above or as additional window. I can't upload any files using firefox or vimb in dwl. That does not happen in plasma-wayland. The file picker in gimp and that in qtox, work fine though.

Is anyone working on layer shell?

From my understanding wlroots already has a lot of the support for layer shell built in. And that we simply need to enable/use it. This should be high priority since enabing layer shell support will give us support for 75% of ecosystem features. Backgrounds, lockscreens, widgets, bars, indicators, notifications will all work if we can just get this implemented.

kvm, qxl: Libinput can not be found on xf86-video-qxl-0.1.5-6/xf86-video-qxl-0.1.5-r6

Interestingly does sway work for me without problems on Alpine Linux.

The error log (without disabling libinput on WLR_LIBINPUT_NO_DEVICES=1 and completely breaking the system) is:

pci id for fd 9: 1b36:0100, driver (null)
MESA-LOADER: failed to open qxl (search paths /usr/lib/xorg/modules/dri)
failed to load driver: qxl
00:00:01.133 [ERROR] [backend/libinput/backend.c:84] libinput initialization failed, no input devices
00:00:01.133 [ERROR] [backend/libinput/backend.c:85] Set WLR_LIBINPUT_NO_DEVICES=1 to suppress this check
00:00:01.133 [ERROR] [backend/multi/backend.c:32] Failed to initialize backend.
startup: backend_start: Not a tty

Development on xf86-video-qxl-0.1.5-6 looks to be stopped 1 year ago.
This user had the same problem.
Are there alternatives without qxl like these or should I file this bug also at wlroots?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.