mirror of
https://codeberg.org/dwl/dwl.git
synced 2026-06-23 07:32:43 +00:00
Compare commits
31 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d41ecb745c | |||
| 52c4fb58ec | |||
| 38c7bd7ee8 | |||
| 6e1bfa86c7 | |||
| e32535cf97 | |||
| f4249db613 | |||
| b2d2b701d7 | |||
| 2c9cb2af1b | |||
| 227cdf0128 | |||
| ca4123072d | |||
| a8915224e8 | |||
| 9b11a49cb7 | |||
| 53e3e60d4d | |||
| 9837ea5729 | |||
| 9ba7461f4d | |||
| aca61738a2 | |||
| 6cd26568d5 | |||
| ed2e1efda8 | |||
| ab4cb6e283 | |||
| b28674e0ca | |||
| 15bfffd87a | |||
| 90b8371707 | |||
| ea263a0ed5 | |||
| 67ff29eb95 | |||
| 661e1ee38c | |||
| 9dbce43a69 | |||
| 59c99308b0 | |||
| 02f8744a48 | |||
| d1880b4422 | |||
| 78e75a83a4 | |||
| 7d2415bfe8 |
@@ -20,6 +20,7 @@ all: dwl
|
||||
dwl: dwl.o util.o
|
||||
$(CC) dwl.o util.o $(DWLCFLAGS) $(LDFLAGS) $(LDLIBS) -o $@
|
||||
dwl.o: dwl.c client.h config.h config.mk cursor-shape-v1-protocol.h \
|
||||
ext-image-copy-capture-v1-protocol.h \
|
||||
pointer-constraints-unstable-v1-protocol.h wlr-layer-shell-unstable-v1-protocol.h \
|
||||
wlr-output-power-management-unstable-v1-protocol.h xdg-shell-protocol.h
|
||||
util.o: util.c util.h
|
||||
@@ -33,6 +34,9 @@ WAYLAND_PROTOCOLS = `$(PKG_CONFIG) --variable=pkgdatadir wayland-protocols`
|
||||
cursor-shape-v1-protocol.h:
|
||||
$(WAYLAND_SCANNER) enum-header \
|
||||
$(WAYLAND_PROTOCOLS)/staging/cursor-shape/cursor-shape-v1.xml $@
|
||||
ext-image-copy-capture-v1-protocol.h:
|
||||
$(WAYLAND_SCANNER) enum-header \
|
||||
$(WAYLAND_PROTOCOLS)/staging/ext-image-copy-capture/ext-image-copy-capture-v1.xml $@
|
||||
pointer-constraints-unstable-v1-protocol.h:
|
||||
$(WAYLAND_SCANNER) enum-header \
|
||||
$(WAYLAND_PROTOCOLS)/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml $@
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
# dwl - dwm for Wayland
|
||||
|
||||
Join us on our IRC channel: [#dwl on Libera Chat]
|
||||
Or on the community-maintained [Discord server].
|
||||
Join us on our [Discord server]
|
||||
Or Matrix: [#dwl-official:matrix.org]
|
||||
Or on our IRC channel: [#dwl on Libera Chat]
|
||||
|
||||
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,
|
||||
intended to fill the same space in the Wayland world that [dwm] does in X11,
|
||||
primarily in terms of functionality, and secondarily in terms of
|
||||
philosophy. Like dwm, dwl is:
|
||||
philosophy. 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`
|
||||
@@ -23,11 +24,13 @@ with each release on the [release] page
|
||||
|
||||
### Development branch [main]
|
||||
Active development progresses on the `main` branch. The `main` branch is built
|
||||
against a late (and often changing) git commit of wlroots. While the adventurous
|
||||
are welcome to use `main`, it is a rocky road. Using `main` requires that the
|
||||
user be willing to chase git commits of wlroots. Testing development pull
|
||||
requests may involve merging unmerged pull requests in [wlroots]' git repository
|
||||
and/or git commits of wayland.
|
||||
against the latest release of [wlroots]. PRs should target this branch unless they
|
||||
depend on functionality that is not in the current release of `wlroots`.
|
||||
|
||||
### Preview branch [wlroots-next]
|
||||
The `wlroots-next` branch is built against the git version of [wlroots], which
|
||||
is unstable and changes frequently. PRs requiring functionality from the git
|
||||
version of `wlroots` should target this branch.
|
||||
|
||||
### Building dwl
|
||||
dwl has the following dependencies:
|
||||
@@ -55,11 +58,11 @@ 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
|
||||
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
|
||||
As in the [dwm] community, we encourage users to share patches they have
|
||||
created. Check out the [dwl-patches] repository!
|
||||
|
||||
## Running dwl
|
||||
@@ -75,7 +78,7 @@ 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 default background color is black. This can be
|
||||
Wayland session. Do note that the default background color is grey. This can be
|
||||
modified in `config.h`.
|
||||
|
||||
If you would like to run a script or command automatically at startup, you can
|
||||
@@ -103,7 +106,7 @@ automatically, you will need to configure it prior to launching `dwl`, e.g.:
|
||||
|
||||
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
|
||||
the `STATUS INFORMATION` section in `_dwl_(1)`). 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,
|
||||
@@ -118,17 +121,26 @@ script with the line
|
||||
|
||||
To get a list of status bars that work with dwl consult our [wiki].
|
||||
|
||||
### (Known) Java nonreparenting WM issue
|
||||
Certain IDEs don't display correctly unless an environmental variable for Java AWT
|
||||
indicates that the WM is nonreparenting.
|
||||
|
||||
For some Java AWT-based IDEs, such as Xilinx Vivado and Microchip MPLAB X, the
|
||||
following environment variable needs to be set before running the IDE or dwl:
|
||||
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
|
||||
## Replacements for X applications
|
||||
|
||||
You can find a [list of useful resources on our wiki].
|
||||
|
||||
## Background
|
||||
|
||||
dwl is not meant to provide every feature under the sun. Instead, like dwm, it
|
||||
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,
|
||||
- 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.
|
||||
@@ -145,10 +157,10 @@ given the base on which it is built. Implemented default features are:
|
||||
- Layer shell popups (used by Waybar)
|
||||
- Damage tracking provided by scenegraph API
|
||||
|
||||
Given the Wayland architecture, dwl has to implement features from dwm **and**
|
||||
Given the Wayland architecture, dwl has to implement features from [dwm] **and**
|
||||
the xorg-server. Because of this, it is impossible to maintain the original
|
||||
project goal of 2000 SLOC and have a reasonably complete compositor with
|
||||
features comparable to dwm. However, this does not mean that the code will grow
|
||||
features comparable to [dwm]. However, this does not mean that the code will grow
|
||||
indiscriminately. We will try to keep the code as small as possible.
|
||||
|
||||
Features under consideration (possibly as patches) are:
|
||||
@@ -172,7 +184,7 @@ 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
|
||||
Many thanks to suckless.org and the [dwm] developers and community for the
|
||||
inspiration, and to the various contributors to the project, including:
|
||||
|
||||
- **Devin J. Pohly for creating and nurturing the fledgling project**
|
||||
@@ -183,6 +195,7 @@ inspiration, and to the various contributors to the project, including:
|
||||
|
||||
|
||||
[wlroots]: https://gitlab.freedesktop.org/wlroots
|
||||
[dwm]: https://dwm.suckless.org/
|
||||
[`systemd --user`]: https://wiki.archlinux.org/title/Systemd/User
|
||||
[#dwl on Libera Chat]: https://web.libera.chat/?channels=#dwl
|
||||
[0.7-rc1]: https://codeberg.org/dwl/dwl/releases/tag/v0.7-rc1
|
||||
@@ -192,6 +205,7 @@ inspiration, and to the various contributors to the project, including:
|
||||
[dwl-patches]: https://codeberg.org/dwl/dwl-patches
|
||||
[list of useful resources on our wiki]: https://codeberg.org/dwl/dwl/wiki/Home#migrating-from-x
|
||||
[main]: https://codeberg.org/dwl/dwl/src/branch/main
|
||||
[wlroots-next]: https://codeberg.org/dwl/dwl/src/branch/wlroots-next
|
||||
[release]: https://codeberg.org/dwl/dwl/releases
|
||||
[runit]: http://smarden.org/runit/faq.html#userservices
|
||||
[s6]: https://skarnet.org/software/s6/
|
||||
@@ -199,3 +213,4 @@ inspiration, and to the various contributors to the project, including:
|
||||
[wiki]: https://codeberg.org/dwl/dwl/wiki/Home#compatible-status-bars
|
||||
[Discord server]: https://discord.gg/jJxZnrGPWN
|
||||
[Wayland]: https://wayland.freedesktop.org/
|
||||
[#dwl-official:matrix.org]: https://matrix.to/#/#dwl-official:matrix.org
|
||||
|
||||
+11
-15
@@ -12,7 +12,7 @@ static const float bordercolor[] = COLOR(0x444444ff);
|
||||
static const float focuscolor[] = COLOR(0x005577ff);
|
||||
static const float urgentcolor[] = COLOR(0xff0000ff);
|
||||
/* This conforms to the xdg-protocol. Set the alpha to zero to restore the old behavior */
|
||||
static const float fullscreen_bg[] = {0.1f, 0.1f, 0.1f, 1.0f}; /* You can also use glsl colors */
|
||||
static const float fullscreen_bg[] = {0.0f, 0.0f, 0.0f, 1.0f}; /* You can also use glsl colors */
|
||||
|
||||
/* tagging - TAGCOUNT must be no greater than 31 */
|
||||
#define TAGCOUNT (9)
|
||||
@@ -20,12 +20,11 @@ static const float fullscreen_bg[] = {0.1f, 0.1f, 0.1f, 1.0f}; /* You ca
|
||||
/* logging */
|
||||
static int log_level = WLR_ERROR;
|
||||
|
||||
/* NOTE: ALWAYS keep a rule declared even if you don't use rules (e.g leave at least one example) */
|
||||
static const Rule rules[] = {
|
||||
/* app_id title tags mask isfloating monitor */
|
||||
/* examples: */
|
||||
{ "Gimp_EXAMPLE", NULL, 0, 1, -1 }, /* Start on currently visible tags floating, not tiled */
|
||||
{ "firefox_EXAMPLE", NULL, 1 << 8, 0, -1 }, /* Start on ONLY tag "9" */
|
||||
/* default/example rule: can be changed but cannot be eliminated; at least one rule must exist */
|
||||
};
|
||||
|
||||
/* layout(s) */
|
||||
@@ -38,17 +37,14 @@ static const Layout layouts[] = {
|
||||
|
||||
/* monitors */
|
||||
/* (x=-1, y=-1) is reserved as an "autoconfigure" monitor position indicator
|
||||
* WARNING: negative values other than (-1, -1) cause problems with Xwayland clients
|
||||
* https://gitlab.freedesktop.org/xorg/xserver/-/issues/899
|
||||
*/
|
||||
/* NOTE: ALWAYS add a fallback rule, even if you are completely sure it won't be used */
|
||||
* WARNING: negative values other than (-1, -1) cause problems with Xwayland clients due to
|
||||
* https://gitlab.freedesktop.org/xorg/xserver/-/issues/899 */
|
||||
static const MonitorRule monrules[] = {
|
||||
/* name mfact nmaster scale layout rotate/reflect x y */
|
||||
/* example of a HiDPI laptop monitor:
|
||||
{ "eDP-1", 0.5f, 1, 2, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 },
|
||||
*/
|
||||
/* defaults */
|
||||
/* name mfact nmaster scale layout rotate/reflect x y
|
||||
* example of a HiDPI laptop monitor:
|
||||
{ "eDP-1", 0.5f, 1, 2, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 }, */
|
||||
{ NULL, 0.55f, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 },
|
||||
/* default monitor rule: can be changed but cannot be eliminated; at least one monitor rule must exist */
|
||||
};
|
||||
|
||||
/* keyboard */
|
||||
@@ -123,7 +119,7 @@ static const char *termcmd[] = { "foot", NULL };
|
||||
static const char *menucmd[] = { "wmenu-run", NULL };
|
||||
|
||||
static const Key keys[] = {
|
||||
/* Note that Shift changes certain key codes: c -> C, 2 -> at, etc. */
|
||||
/* Note that Shift changes certain key codes: 2 -> at, etc. */
|
||||
/* modifier key function argument */
|
||||
{ MODKEY, XKB_KEY_p, spawn, {.v = menucmd} },
|
||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Return, spawn, {.v = termcmd} },
|
||||
@@ -135,7 +131,7 @@ static const Key keys[] = {
|
||||
{ MODKEY, XKB_KEY_l, setmfact, {.f = +0.05f} },
|
||||
{ MODKEY, XKB_KEY_Return, zoom, {0} },
|
||||
{ MODKEY, XKB_KEY_Tab, view, {0} },
|
||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_C, killclient, {0} },
|
||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_c, killclient, {0} },
|
||||
{ MODKEY, XKB_KEY_t, setlayout, {.v = &layouts[0]} },
|
||||
{ MODKEY, XKB_KEY_f, setlayout, {.v = &layouts[1]} },
|
||||
{ MODKEY, XKB_KEY_m, setlayout, {.v = &layouts[2]} },
|
||||
@@ -157,7 +153,7 @@ static const Key keys[] = {
|
||||
TAGKEYS( XKB_KEY_7, XKB_KEY_ampersand, 6),
|
||||
TAGKEYS( XKB_KEY_8, XKB_KEY_asterisk, 7),
|
||||
TAGKEYS( XKB_KEY_9, XKB_KEY_parenleft, 8),
|
||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Q, quit, {0} },
|
||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_q, quit, {0} },
|
||||
|
||||
/* Ctrl-Alt-Backspace and Ctrl-Alt-Fx used to be handled by X server */
|
||||
{ WLR_MODIFIER_CTRL|WLR_MODIFIER_ALT,XKB_KEY_Terminate_Server, quit, {0} },
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
_VERSION = 0.8-dev
|
||||
_VERSION = 0.9-dev
|
||||
VERSION = `git describe --tags --dirty 2>/dev/null || echo $(_VERSION)`
|
||||
|
||||
PKG_CONFIG = pkg-config
|
||||
@@ -8,8 +8,8 @@ PREFIX = /usr/local
|
||||
MANDIR = $(PREFIX)/share/man
|
||||
DATADIR = $(PREFIX)/share
|
||||
|
||||
WLR_INCS = `$(PKG_CONFIG) --cflags wlroots-0.19`
|
||||
WLR_LIBS = `$(PKG_CONFIG) --libs wlroots-0.19`
|
||||
WLR_INCS = `$(PKG_CONFIG) --cflags wlroots-0.20`
|
||||
WLR_LIBS = `$(PKG_CONFIG) --libs wlroots-0.20`
|
||||
|
||||
# Allow using an alternative wlroots installation
|
||||
# This has to have all the includes required by wlroots, e.g:
|
||||
|
||||
@@ -37,7 +37,7 @@ starts a shell process running
|
||||
when starting.
|
||||
When stopping, it sends
|
||||
.Dv SIGTERM
|
||||
to the child process and waits for it to exit.
|
||||
to the child process group and waits for it to exit.
|
||||
.Pp
|
||||
Users are encouraged to customize
|
||||
.Nm
|
||||
@@ -55,10 +55,10 @@ Move window to a single tag.
|
||||
Toggle tag for window.
|
||||
.It Mod-p
|
||||
Spawn
|
||||
.Nm wmenu-run .
|
||||
.Xr wmenu-run 1 .
|
||||
.It Mod-Shift-Return
|
||||
Spawn
|
||||
.Nm foot .
|
||||
.Xr foot 1 .
|
||||
.It Mod-[jk]
|
||||
Move focus down/up the stack.
|
||||
.It Mod-[id]
|
||||
@@ -100,6 +100,114 @@ Quit
|
||||
.Nm .
|
||||
.El
|
||||
These might differ depending on your keyboard layout.
|
||||
.Ss Mouse commands
|
||||
.Bl -tag -width 20n -offset indent -compact
|
||||
.It Mod-Button1
|
||||
Move focused window while dragging.
|
||||
Tiled windows will be toggled to the floating state.
|
||||
.It Mod-Button2
|
||||
Toggle focused window between floating and tiled state.
|
||||
.It Mod-Button3
|
||||
Resize focused window while dragging.
|
||||
Tiled windows will be toggled to the floating state.
|
||||
.El
|
||||
.Sh STATUS INFORMATION
|
||||
.Nm
|
||||
writes its status information to standard output.
|
||||
If the
|
||||
.Fl s
|
||||
option is given, the status information is written to the standard input of the
|
||||
child process instead.
|
||||
.Pp
|
||||
Said information has the following format:
|
||||
.Bd -ragged -offset indent
|
||||
.Ar <monitor>
|
||||
.Ar <component>
|
||||
.Ar <data>
|
||||
.Ed
|
||||
.Pp
|
||||
.Bl -tag -width 11n -offset 0 -compact
|
||||
.It Ar <monitor>
|
||||
is the name given to the output.
|
||||
.It Ar <component>
|
||||
is one of (in order)
|
||||
.Em title ,
|
||||
.Em appid ,
|
||||
.Em fullscreen ,
|
||||
.Em floating ,
|
||||
.Em selmon ,
|
||||
.Em tags ,
|
||||
.Em layout .
|
||||
.It Ar <data>
|
||||
changes depending on
|
||||
.Ar <component> .
|
||||
.Bl -tag -width 10n -compact
|
||||
.It Em title
|
||||
The title of the focused window on
|
||||
.Ar <monitor>
|
||||
or nothing if there is no focused window.
|
||||
.It Em appid
|
||||
The app_id of the focused window on
|
||||
.Ar <monitor>
|
||||
or nothing if there is no focused window.
|
||||
.It Em fullscreen
|
||||
Prints 1 if the focused window on
|
||||
.Ar <monitor>
|
||||
is in fullscreen state, otherwise prints 0. If there is no focused
|
||||
window it prints nothing.
|
||||
.It Em floating
|
||||
Prints 1 if the focused window on
|
||||
.Ar <monitor>
|
||||
is in floating state, otherwise prints 0. If there is no focused
|
||||
window it prints nothing.
|
||||
.It Em selmon
|
||||
Prints 1 if
|
||||
.Ar <monitor>
|
||||
is the selected monitor, otherwise prints 0.
|
||||
.It Em tags
|
||||
Prints four bitmasks in the following order:
|
||||
.Bl -bullet -width 2n -compact
|
||||
.It
|
||||
Occupied tags of
|
||||
.Ar <monitor> .
|
||||
.It
|
||||
Selected tags of
|
||||
.Ar <monitor> .
|
||||
.It
|
||||
Tags of the focused window on
|
||||
.Ar <monitor> .
|
||||
.It
|
||||
Tags where a window on
|
||||
.Ar <monitor>
|
||||
requested activation or has urgency hints.
|
||||
.El
|
||||
The bitmasks are 32-bit unsigned decimal integers.
|
||||
.It Em layout
|
||||
Prints the symbol of the current layout.
|
||||
.El
|
||||
.El
|
||||
.Ss Examples
|
||||
When there is a selected window:
|
||||
.Bd -literal -offset indent
|
||||
HDMI\-A\-1 title \(ti/source/repos/dwl > man \-l dwl.1
|
||||
HDMI\-A\-1 appid footclient
|
||||
HDMI\-A\-1 fullscreen 0
|
||||
HDMI\-A\-1 floating 0
|
||||
HDMI\-A\-1 selmon 1
|
||||
HDMI\-A\-1 tags 271 4 4 0
|
||||
HDMI\-A\-1 layout [T]
|
||||
.Ed
|
||||
.Pp
|
||||
When there is no selected window:
|
||||
.Bd -literal -offset indent
|
||||
HDMI\-A\-1 title
|
||||
HDMI\-A\-1 appid
|
||||
HDMI\-A\-1 fullscreen
|
||||
HDMI\-A\-1 floating
|
||||
HDMI\-A\-1 selmon 1
|
||||
HDMI\-A\-1 tags 271 512 0 0
|
||||
HDMI\-A\-1 layout [T]
|
||||
.Ed
|
||||
.Sh ENVIRONMENT
|
||||
These environment variables are used by
|
||||
.Nm :
|
||||
@@ -142,17 +250,9 @@ Start
|
||||
with s6 in the background:
|
||||
.Dl dwl \-s \(aqs6\-svscan <&\-\(aq
|
||||
.Sh SEE ALSO
|
||||
.Xr dwm 1 ,
|
||||
.Xr foot 1 ,
|
||||
.Xr wmenu 1 ,
|
||||
.Xr dwm 1 ,
|
||||
.Xr xkeyboard-config 7
|
||||
.Sh CAVEATS
|
||||
The child process's standard input is connected with a pipe to
|
||||
.Nm .
|
||||
If the child process neither reads from the pipe nor closes its
|
||||
standard input,
|
||||
.Nm
|
||||
will freeze after a while due to it blocking when writing to the full
|
||||
pipe buffer.
|
||||
.Sh BUGS
|
||||
All of them.
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
#include <wlr/types/wlr_data_device.h>
|
||||
#include <wlr/types/wlr_drm.h>
|
||||
#include <wlr/types/wlr_export_dmabuf_v1.h>
|
||||
#include <wlr/types/wlr_ext_data_control_v1.h>
|
||||
#include <wlr/types/wlr_ext_image_capture_source_v1.h>
|
||||
#include <wlr/types/wlr_ext_image_copy_capture_v1.h>
|
||||
#include <wlr/types/wlr_fractional_scale_v1.h>
|
||||
#include <wlr/types/wlr_gamma_control_v1.h>
|
||||
#include <wlr/types/wlr_idle_inhibit_v1.h>
|
||||
@@ -68,6 +71,7 @@
|
||||
#include <xcb/xcb_icccm.h>
|
||||
#endif
|
||||
|
||||
#include "xdg-shell-protocol.h"
|
||||
#include "util.h"
|
||||
|
||||
/* macros */
|
||||
@@ -483,7 +487,6 @@ applyrules(Client *c)
|
||||
const Rule *r;
|
||||
Monitor *mon = selmon, *m;
|
||||
|
||||
c->isfloating = client_is_float_type(c);
|
||||
appid = client_get_appid(c);
|
||||
title = client_get_title(c);
|
||||
|
||||
@@ -499,6 +502,8 @@ applyrules(Client *c)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
c->isfloating |= client_is_float_type(c);
|
||||
setmon(c, mon, newtags);
|
||||
}
|
||||
|
||||
@@ -584,7 +589,7 @@ arrangelayers(Monitor *m)
|
||||
arrange(m);
|
||||
}
|
||||
|
||||
/* Arrange non-exlusive surfaces from top->bottom */
|
||||
/* Arrange non-exclusive surfaces from top->bottom */
|
||||
for (i = 3; i >= 0; i--)
|
||||
arrangelayer(m, &m->layers[i], &usable_area, 0);
|
||||
|
||||
@@ -739,6 +744,8 @@ cleanupmon(struct wl_listener *listener, void *data)
|
||||
wl_list_remove(&m->frame.link);
|
||||
wl_list_remove(&m->link);
|
||||
wl_list_remove(&m->request_state.link);
|
||||
if (m->lock_surface)
|
||||
destroylocksurface(&m->destroy_lock_surface, NULL);
|
||||
m->wlr_output->data = NULL;
|
||||
wlr_output_layout_remove(output_layout, m->wlr_output);
|
||||
wlr_scene_output_destroy(m->scene_output);
|
||||
@@ -1613,7 +1620,8 @@ keybinding(uint32_t mods, xkb_keysym_t sym)
|
||||
const Key *k;
|
||||
for (k = keys; k < END(keys); k++) {
|
||||
if (CLEANMASK(mods) == CLEANMASK(k->mod)
|
||||
&& sym == k->keysym && k->func) {
|
||||
&& xkb_keysym_to_lower(sym) == xkb_keysym_to_lower(k->keysym)
|
||||
&& k->func) {
|
||||
k->func(&k->arg);
|
||||
return 1;
|
||||
}
|
||||
@@ -1963,7 +1971,7 @@ moveresize(const Arg *arg)
|
||||
case CurMove:
|
||||
grabcx = (int)round(cursor->x) - grabc->geom.x;
|
||||
grabcy = (int)round(cursor->y) - grabc->geom.y;
|
||||
wlr_cursor_set_xcursor(cursor, cursor_mgr, "fleur");
|
||||
wlr_cursor_set_xcursor(cursor, cursor_mgr, "all-scroll");
|
||||
break;
|
||||
case CurResize:
|
||||
/* Doesn't work for X11 output - the next absolute motion event
|
||||
@@ -2129,7 +2137,7 @@ powermgrsetmode(struct wl_listener *listener, void *data)
|
||||
if (!m)
|
||||
return;
|
||||
|
||||
m->gamma_lut_changed = 1; /* Reapply gamma LUT when re-enabling the ouput */
|
||||
m->gamma_lut_changed = 1; /* Reapply gamma LUT when re-enabling the output */
|
||||
wlr_output_state_set_enabled(&state, event->mode);
|
||||
wlr_output_commit_state(m->wlr_output, &state);
|
||||
|
||||
@@ -2451,7 +2459,7 @@ setup(void)
|
||||
wlr_log_init(log_level, NULL);
|
||||
|
||||
/* The Wayland display is managed by libwayland. It handles accepting
|
||||
* clients from the Unix socket, manging Wayland globals, and so on. */
|
||||
* clients from the Unix socket, managing Wayland globals, and so on. */
|
||||
dpy = wl_display_create();
|
||||
event_loop = wl_display_get_event_loop(dpy);
|
||||
|
||||
@@ -2513,7 +2521,10 @@ setup(void)
|
||||
wlr_data_device_manager_create(dpy);
|
||||
wlr_export_dmabuf_manager_v1_create(dpy);
|
||||
wlr_screencopy_manager_v1_create(dpy);
|
||||
wlr_ext_image_copy_capture_manager_v1_create(dpy, 1);
|
||||
wlr_ext_output_image_capture_source_manager_v1_create(dpy, 1);
|
||||
wlr_data_control_manager_v1_create(dpy);
|
||||
wlr_ext_data_control_manager_v1_create(dpy, 1);
|
||||
wlr_primary_selection_v1_device_manager_create(dpy);
|
||||
wlr_viewporter_create(dpy);
|
||||
wlr_single_pixel_buffer_manager_v1_create(dpy);
|
||||
@@ -3172,9 +3183,7 @@ xwaylandready(struct wl_listener *listener, void *data)
|
||||
|
||||
/* Set the default XWayland cursor to match the rest of dwl. */
|
||||
if ((xcursor = wlr_xcursor_manager_get_xcursor(cursor_mgr, "default", 1)))
|
||||
wlr_xwayland_set_cursor(xwayland,
|
||||
xcursor->images[0]->buffer, xcursor->images[0]->width * 4,
|
||||
xcursor->images[0]->width, xcursor->images[0]->height,
|
||||
wlr_xwayland_set_cursor(xwayland, wlr_xcursor_image_get_buffer(xcursor->images[0]),
|
||||
xcursor->images[0]->hotspot_x, xcursor->images[0]->hotspot_y);
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user