mirror of
https://codeberg.org/dwl/dwl.git
synced 2026-11-04 04:03:14 +00:00
Compare commits
68
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2d16962424 | ||
|
|
7622bd3187 | ||
|
|
12a5856427 | ||
|
|
4ecb2a9df5 | ||
|
|
4953b7ea0c | ||
|
|
9dfaea2f79 | ||
|
|
afbafd53ab | ||
|
|
4ff9db2c40 | ||
|
|
d3fa32993c | ||
|
|
f08d8b3913 | ||
|
|
90e7c722e9 | ||
|
|
e2038450f2 | ||
|
|
4fd683cc84 | ||
|
|
d29259c26a | ||
|
|
fccce97448 | ||
|
|
d9ddaba762 | ||
|
|
5af5dd5e7e | ||
|
|
d3d4da3bd2 | ||
|
|
f1675a4800 | ||
|
|
a75ca79630 | ||
|
|
87029e21c0 | ||
|
|
a514a928e4 | ||
|
|
242ffd7a75 | ||
|
|
f22c223cbf | ||
|
|
b83881f881 | ||
|
|
fa400c5d3d | ||
|
|
40b0ae76ae | ||
|
|
2a567195e6 | ||
|
|
cc23250527 | ||
|
|
98bea2c27f | ||
|
|
49837e985e | ||
|
|
d16036e690 | ||
|
|
45054a34a4 | ||
|
|
669b26d0a9 | ||
|
|
e451862544 | ||
|
|
b3223b15e9 | ||
|
|
1fe1b4e66e | ||
|
|
1dae5ba3ed | ||
|
|
433c325fb2 | ||
|
|
6013835337 | ||
|
|
f6e3a2826e | ||
|
|
aa0c1659d3 | ||
|
|
bab3fdadf3 | ||
|
|
0f8630282d | ||
|
|
4de32d2d5c | ||
|
|
36c80aff03 | ||
|
|
68c6319e3f | ||
|
|
c824886b8c | ||
|
|
498a0e605c | ||
|
|
fec0699985 | ||
|
|
e7f185ed3e | ||
|
|
f9c644f0b0 | ||
|
|
dc9a860191 | ||
|
|
d1ebf3c985 | ||
|
|
8f52e96be4 | ||
|
|
5fd19feaff | ||
|
|
b1c101515a | ||
|
|
8ad2c920db | ||
|
|
e8bf70d639 | ||
|
|
88c0c68d59 | ||
|
|
d41ecb745c | ||
|
|
52c4fb58ec | ||
|
|
38c7bd7ee8 | ||
|
|
6e1bfa86c7 | ||
|
|
e32535cf97 | ||
|
|
f4249db613 | ||
|
|
b2d2b701d7 | ||
|
|
2c9cb2af1b |
+90
-7
@@ -1,12 +1,98 @@
|
||||
# Changelog
|
||||
|
||||
* [Unreleased](#unreleased)
|
||||
* [0.9](#0.9)
|
||||
* [0.8](#0.8)
|
||||
* [0.7](#0.7)
|
||||
* [0.6](#0.6)
|
||||
* [0.5](#0.5)
|
||||
|
||||
|
||||
## Unreleased
|
||||
## 0.9
|
||||
|
||||
### Added
|
||||
|
||||
* Add axis mouse bindings ([#652][652])
|
||||
* Add support for the ext-data-control protocol ([#1184][1184])
|
||||
* Add support for the ext-foreign-toplevel-list protocol ([#1223][1223])
|
||||
* Add support for the ext-image-copy-capture and ext-image-capture-source protocols (screensharing) ([#1218][1218], [#1223][1223], [#1224][1224])
|
||||
* Add support for version 4 of the layer shell protocol (on-demand keyboard interactivity) ([#674][674])
|
||||
* Add support for wlr-text-input and wlr-input-method protocols (IME) ([#1219][1219])
|
||||
* Snap windows to edges when moving or resizing them ([#608][608])
|
||||
|
||||
[1184]: https://codeberg.org/dwl/dwl/pulls/1184
|
||||
[1218]: https://codeberg.org/dwl/dwl/pulls/1218
|
||||
[1219]: https://codeberg.org/dwl/dwl/pulls/1219
|
||||
[1223]: https://codeberg.org/dwl/dwl/pulls/1223
|
||||
[1224]: https://codeberg.org/dwl/dwl/pulls/1224
|
||||
[608]: https://codeberg.org/dwl/dwl/pulls/608
|
||||
[652]: https://codeberg.org/dwl/dwl/pulls/652
|
||||
[674]: https://codeberg.org/dwl/dwl/pulls/674
|
||||
|
||||
|
||||
### Changed
|
||||
|
||||
* Update wlroots to version 0.20 ([#1218][1218])
|
||||
* Use modifier-independent key symbols in config.h keybindings ([#1075][1075])
|
||||
|
||||
[1075]: https://codeberg.org/dwl/dwl/pulls/1075
|
||||
[1218]: https://codeberg.org/dwl/dwl/pulls/1218
|
||||
|
||||
|
||||
### Fixed
|
||||
|
||||
* Apply a minimum window size of 1x1 ([#1231][1231])
|
||||
* Close Xwayland submenus when changing tag or focus ([#1233][1233])
|
||||
* Don't make Firefox draw rounded corners when it is opened ([#d1ebf3c][d1ebf3c])
|
||||
* Don't send key release events to the wrong client ([#1108][1108])
|
||||
* Fix a crash when closing mpv ([#1220][1220])
|
||||
* Fix a crash when destroying an idle-inhibitor ([#1214][1214])
|
||||
* Fix choppy resizing on newer wlroots ([#1280][1280])
|
||||
* Fix the position of certain sub-menus in Xwayland applications ([#1232][1232])
|
||||
* Keep the focused border color on the regular client when opening a layer shell surface like wmenu ([#6013835][6013835])
|
||||
* Let keybindings focus and tag monitors above and below ([#5fd19fe][5fd19fe])
|
||||
* Preserve asleep disabled outputs in output config ([#1198][1198])
|
||||
* Respect size hints ([#4de32d2][4de32d2])
|
||||
* Set seat capabilities for virtual keyboards and pointers when there is no other input device ([#99cdc9a][99cdc9a])
|
||||
* Show popups in fullscreen Xwayland applications ([#1fe1b4e][1fe1b4e])
|
||||
* Show the correct cursor after moving and resizing ([#8ad2c92][8ad2c92])
|
||||
|
||||
[1108]: https://codeberg.org/dwl/dwl/pulls/1108
|
||||
[1198]: https://codeberg.org/dwl/dwl/pulls/1198
|
||||
[1214]: https://codeberg.org/dwl/dwl/pulls/1214
|
||||
[1220]: https://codeberg.org/dwl/dwl/pulls/1220
|
||||
[1231]: https://codeberg.org/dwl/dwl/pulls/1231
|
||||
[1232]: https://codeberg.org/dwl/dwl/pulls/1232
|
||||
[1233]: https://codeberg.org/dwl/dwl/pulls/1233
|
||||
[1280]: https://codeberg.org/dwl/dwl/pulls/1280
|
||||
[1fe1b4e]: https://codeberg.org/dwl/dwl/commit/1fe1b4e
|
||||
[4de32d2]: https://codeberg.org/dwl/dwl/commit/4de32d2
|
||||
[5fd19fe]: https://codeberg.org/dwl/dwl/commit/5fd19fe
|
||||
[6013835]: https://codeberg.org/dwl/dwl/commit/6013835
|
||||
[8ad2c92]: https://codeberg.org/dwl/dwl/commit/8ad2c92
|
||||
[99cdc9a]: https://codeberg.org/dwl/dwl/commit/99cdc9a
|
||||
[d1ebf3c]: https://codeberg.org/dwl/dwl/commit/d1ebf3c
|
||||
|
||||
|
||||
### Contributors
|
||||
|
||||
|
||||
* A Frederick Christensen
|
||||
* Alex Denes
|
||||
* Andrea Chiavazza
|
||||
* Diego Viola
|
||||
* Guido Cella
|
||||
* Leonardo Hernández Hernández
|
||||
* Peter Hofmann
|
||||
* Siva Mahadevan
|
||||
* julmajustus
|
||||
* klim
|
||||
* save196
|
||||
* sewn
|
||||
* thanatos
|
||||
|
||||
|
||||
## 0.8
|
||||
|
||||
### Added
|
||||
|
||||
* Support for the linux-drm-syncobj-v1 protocol ([wlroots!4715][wlroots!4715], [#685][685])
|
||||
@@ -17,15 +103,12 @@
|
||||
[646]: https://codeberg.org/dwl/dwl/pulls/646
|
||||
|
||||
|
||||
### Changed
|
||||
### Deprecated
|
||||
### Removed
|
||||
### Fixed
|
||||
|
||||
* Crash when a client is created while all outputs are disabled.
|
||||
|
||||
### Security
|
||||
### Contributors
|
||||
|
||||
Most changes in this release are not listed. See the commits for details.
|
||||
|
||||
|
||||
## 0.7
|
||||
|
||||
@@ -15,6 +15,32 @@ client_is_x11(Client *c)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void
|
||||
client_get_size_hints(Client *c, struct wlr_box *max, struct wlr_box *min)
|
||||
{
|
||||
struct wlr_xdg_toplevel_state *state;
|
||||
|
||||
#ifdef XWAYLAND
|
||||
if (client_is_x11(c)) {
|
||||
xcb_size_hints_t *size_hints = c->surface.xwayland->size_hints;
|
||||
if (size_hints) {
|
||||
max->width = size_hints->max_width;
|
||||
max->height = size_hints->max_height;
|
||||
min->width = size_hints->min_width;
|
||||
min->height = size_hints->min_height;
|
||||
}
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
state = &c->surface.xdg->toplevel->current;
|
||||
max->width = state->max_width;
|
||||
max->height = state->max_height;
|
||||
min->width = state->min_width;
|
||||
min->height = state->min_height;
|
||||
}
|
||||
|
||||
|
||||
static inline struct wlr_surface *
|
||||
client_surface(Client *c)
|
||||
{
|
||||
@@ -163,6 +189,7 @@ client_get_geometry(Client *c, struct wlr_box *geom)
|
||||
}
|
||||
#endif
|
||||
*geom = c->surface.xdg->geometry;
|
||||
geom->x = geom->y = 0;
|
||||
}
|
||||
|
||||
static inline Client *
|
||||
@@ -206,13 +233,12 @@ client_get_title(Client *c)
|
||||
static inline int
|
||||
client_is_float_type(Client *c)
|
||||
{
|
||||
struct wlr_xdg_toplevel *toplevel;
|
||||
struct wlr_xdg_toplevel_state state;
|
||||
struct wlr_box min = {0}, max = {0};
|
||||
client_get_size_hints(c, &max, &min);
|
||||
|
||||
#ifdef XWAYLAND
|
||||
if (client_is_x11(c)) {
|
||||
struct wlr_xwayland_surface *surface = c->surface.xwayland;
|
||||
xcb_size_hints_t *size_hints = surface->size_hints;
|
||||
if (surface->modal)
|
||||
return 1;
|
||||
|
||||
@@ -223,59 +249,13 @@ client_is_float_type(Client *c)
|
||||
return 1;
|
||||
}
|
||||
|
||||
return size_hints && size_hints->min_width > 0 && size_hints->min_height > 0
|
||||
&& (size_hints->max_width == size_hints->min_width
|
||||
|| size_hints->max_height == size_hints->min_height);
|
||||
return min.width > 0 && min.height > 0 &&
|
||||
(min.width == max.width || min.height == max.height);
|
||||
}
|
||||
#endif
|
||||
|
||||
toplevel = c->surface.xdg->toplevel;
|
||||
state = toplevel->current;
|
||||
return toplevel->parent || (state.min_width != 0 && state.min_height != 0
|
||||
&& (state.min_width == state.max_width
|
||||
|| state.min_height == state.max_height));
|
||||
}
|
||||
|
||||
static inline int
|
||||
client_is_rendered_on_mon(Client *c, Monitor *m)
|
||||
{
|
||||
/* This is needed for when you don't want to check formal assignment,
|
||||
* but rather actual displaying of the pixels.
|
||||
* Usually VISIBLEON suffices and is also faster. */
|
||||
struct wlr_surface_output *s;
|
||||
int unused_lx, unused_ly;
|
||||
if (!wlr_scene_node_coords(&c->scene->node, &unused_lx, &unused_ly))
|
||||
return 0;
|
||||
wl_list_for_each(s, &client_surface(c)->current_outputs, link)
|
||||
if (s->output == m->wlr_output)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int
|
||||
client_is_stopped(Client *c)
|
||||
{
|
||||
int pid;
|
||||
siginfo_t in = {0};
|
||||
#ifdef XWAYLAND
|
||||
if (client_is_x11(c))
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
wl_client_get_credentials(c->surface.xdg->client->client, &pid, NULL, NULL);
|
||||
if (waitid(P_PID, pid, &in, WNOHANG|WCONTINUED|WSTOPPED|WNOWAIT) < 0) {
|
||||
/* This process is not our child process, while is very unlikely that
|
||||
* it is stopped, in order to do not skip frames, assume that it is. */
|
||||
if (errno == ECHILD)
|
||||
return 1;
|
||||
} else if (in.si_pid) {
|
||||
if (in.si_code == CLD_STOPPED || in.si_code == CLD_TRAPPED)
|
||||
return 1;
|
||||
if (in.si_code == CLD_CONTINUED)
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return c->surface.xdg->toplevel->parent || (min.width > 0 && min.height > 0 &&
|
||||
(min.width == max.width || min.height == max.height));
|
||||
}
|
||||
|
||||
static inline int
|
||||
@@ -344,6 +324,7 @@ client_set_scale(struct wlr_surface *s, float scale)
|
||||
wlr_surface_set_preferred_buffer_scale(s, (int32_t)ceilf(scale));
|
||||
}
|
||||
|
||||
/* Returns nonzero if the client has to commit a buffer with the new size */
|
||||
static inline uint32_t
|
||||
client_set_size(Client *c, uint32_t width, uint32_t height)
|
||||
{
|
||||
@@ -351,15 +332,30 @@ client_set_size(Client *c, uint32_t width, uint32_t height)
|
||||
if (client_is_x11(c)) {
|
||||
wlr_xwayland_surface_configure(c->surface.xwayland,
|
||||
c->geom.x + c->bw, c->geom.y + c->bw, width, height);
|
||||
return 0;
|
||||
return (int)width != client_surface(c)->current.width
|
||||
|| (int)height != client_surface(c)->current.height;
|
||||
}
|
||||
#endif
|
||||
if ((int32_t)width == c->surface.xdg->toplevel->current.width
|
||||
&& (int32_t)height == c->surface.xdg->toplevel->current.height)
|
||||
if ((int32_t)width == c->surface.xdg->toplevel->scheduled.width
|
||||
&& (int32_t)height == c->surface.xdg->toplevel->scheduled.height)
|
||||
return 0;
|
||||
return wlr_xdg_toplevel_set_size(c->surface.xdg->toplevel, (int32_t)width, (int32_t)height);
|
||||
}
|
||||
|
||||
static inline void
|
||||
client_send_frame_done_iterator(struct wlr_surface *s, int sx, int sy, void *data)
|
||||
{
|
||||
wlr_surface_send_frame_done(s, data);
|
||||
}
|
||||
|
||||
static inline void
|
||||
client_send_frame_done(Client *c)
|
||||
{
|
||||
struct timespec now;
|
||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||
wlr_surface_for_each_surface(client_surface(c), client_send_frame_done_iterator, &now);
|
||||
}
|
||||
|
||||
static inline void
|
||||
client_set_tiled(Client *c, uint32_t edges)
|
||||
{
|
||||
|
||||
+26
-18
@@ -7,6 +7,7 @@
|
||||
static const int sloppyfocus = 1; /* focus follows mouse */
|
||||
static const int bypass_surface_visibility = 0; /* 1 means idle inhibitors will disable idle tracking even if it's surface isn't visible */
|
||||
static const unsigned int borderpx = 1; /* border pixel of windows */
|
||||
static const unsigned int snap = 32; /* snap pixel */
|
||||
static const float rootcolor[] = COLOR(0x222222ff);
|
||||
static const float bordercolor[] = COLOR(0x444444ff);
|
||||
static const float focuscolor[] = COLOR(0x005577ff);
|
||||
@@ -105,11 +106,11 @@ static const enum libinput_config_tap_button_map button_map = LIBINPUT_CONFIG_TA
|
||||
/* If you want to use the windows key for MODKEY, use WLR_MODIFIER_LOGO */
|
||||
#define MODKEY WLR_MODIFIER_ALT
|
||||
|
||||
#define TAGKEYS(KEY,SKEY,TAG) \
|
||||
#define TAGKEYS(KEY,TAG) \
|
||||
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|WLR_MODIFIER_CTRL, KEY, toggleview, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|WLR_MODIFIER_SHIFT, SKEY, tag, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|WLR_MODIFIER_CTRL|WLR_MODIFIER_SHIFT,SKEY,toggletag, {.ui = 1 << TAG} }
|
||||
{ MODKEY|WLR_MODIFIER_SHIFT, KEY, tag, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|WLR_MODIFIER_CTRL|WLR_MODIFIER_SHIFT,KEY,toggletag, {.ui = 1 << TAG} }
|
||||
|
||||
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
|
||||
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
||||
@@ -119,7 +120,6 @@ static const char *termcmd[] = { "foot", NULL };
|
||||
static const char *menucmd[] = { "wmenu-run", NULL };
|
||||
|
||||
static const Key keys[] = {
|
||||
/* 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} },
|
||||
@@ -139,28 +139,28 @@ static const Key keys[] = {
|
||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_space, togglefloating, {0} },
|
||||
{ MODKEY, XKB_KEY_e, togglefullscreen, {0} },
|
||||
{ MODKEY, XKB_KEY_0, view, {.ui = ~0} },
|
||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_parenright, tag, {.ui = ~0} },
|
||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_0, tag, {.ui = ~0} },
|
||||
{ MODKEY, XKB_KEY_comma, focusmon, {.i = WLR_DIRECTION_LEFT} },
|
||||
{ MODKEY, XKB_KEY_period, focusmon, {.i = WLR_DIRECTION_RIGHT} },
|
||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_less, tagmon, {.i = WLR_DIRECTION_LEFT} },
|
||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_greater, tagmon, {.i = WLR_DIRECTION_RIGHT} },
|
||||
TAGKEYS( XKB_KEY_1, XKB_KEY_exclam, 0),
|
||||
TAGKEYS( XKB_KEY_2, XKB_KEY_at, 1),
|
||||
TAGKEYS( XKB_KEY_3, XKB_KEY_numbersign, 2),
|
||||
TAGKEYS( XKB_KEY_4, XKB_KEY_dollar, 3),
|
||||
TAGKEYS( XKB_KEY_5, XKB_KEY_percent, 4),
|
||||
TAGKEYS( XKB_KEY_6, XKB_KEY_asciicircum, 5),
|
||||
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_comma, tagmon, {.i = WLR_DIRECTION_LEFT} },
|
||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_period, tagmon, {.i = WLR_DIRECTION_RIGHT} },
|
||||
TAGKEYS( XKB_KEY_1, 0),
|
||||
TAGKEYS( XKB_KEY_2, 1),
|
||||
TAGKEYS( XKB_KEY_3, 2),
|
||||
TAGKEYS( XKB_KEY_4, 3),
|
||||
TAGKEYS( XKB_KEY_5, 4),
|
||||
TAGKEYS( XKB_KEY_6, 5),
|
||||
TAGKEYS( XKB_KEY_7, 6),
|
||||
TAGKEYS( XKB_KEY_8, 7),
|
||||
TAGKEYS( XKB_KEY_9, 8),
|
||||
{ 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} },
|
||||
{ WLR_MODIFIER_CTRL|WLR_MODIFIER_ALT,XKB_KEY_BackSpace, quit, {0} },
|
||||
/* Ctrl-Alt-Fx is used to switch to another VT, if you don't know what a VT is
|
||||
* do not remove them.
|
||||
*/
|
||||
#define CHVT(n) { WLR_MODIFIER_CTRL|WLR_MODIFIER_ALT,XKB_KEY_XF86Switch_VT_##n, chvt, {.ui = (n)} }
|
||||
#define CHVT(n) { WLR_MODIFIER_CTRL|WLR_MODIFIER_ALT,XKB_KEY_F##n, chvt, {.ui = (n)} }
|
||||
CHVT(1), CHVT(2), CHVT(3), CHVT(4), CHVT(5), CHVT(6),
|
||||
CHVT(7), CHVT(8), CHVT(9), CHVT(10), CHVT(11), CHVT(12),
|
||||
};
|
||||
@@ -170,3 +170,11 @@ static const Button buttons[] = {
|
||||
{ MODKEY, BTN_MIDDLE, togglefloating, {0} },
|
||||
{ MODKEY, BTN_RIGHT, moveresize, {.ui = CurResize} },
|
||||
};
|
||||
|
||||
static const Axis axes[] = {
|
||||
/* example of volume control:
|
||||
{ MODKEY, AxisUp, spawn, SHCMD("volume-up_EXAMPLE") },
|
||||
{ MODKEY, AxisDown, spawn, SHCMD("volume-down_EXAMPLE") }, */
|
||||
{ 0, 0, NULL, {0} },
|
||||
/* does nothing, but the array cannot be empty */
|
||||
};
|
||||
|
||||
@@ -8,21 +8,21 @@ PREFIX = /usr/local
|
||||
MANDIR = $(PREFIX)/share/man
|
||||
DATADIR = $(PREFIX)/share
|
||||
|
||||
WLR_INCS = `$(PKG_CONFIG) --cflags wlroots-0.20`
|
||||
WLR_LIBS = `$(PKG_CONFIG) --libs wlroots-0.20`
|
||||
WLR_INCS = `$(PKG_CONFIG) --cflags wlroots-0.21`
|
||||
WLR_LIBS = `$(PKG_CONFIG) --libs wlroots-0.21`
|
||||
|
||||
# Allow using an alternative wlroots installation
|
||||
# This has to have all the includes required by wlroots, e.g:
|
||||
# Assuming wlroots git repo is "${PWD}/wlroots" and you only ran "meson setup build && ninja -C build"
|
||||
#WLR_INCS = -I/usr/include/pixman-1 -I/usr/include/elogind -I/usr/include/libdrm \
|
||||
# -I$(PWD)/wlroots/include
|
||||
# WLR_INCS = -I/usr/include/pixman-1 -I/usr/include/elogind -I/usr/include/libdrm \
|
||||
# -I$(PWD)/wlroots/include
|
||||
# Set -rpath to avoid using the wrong library.
|
||||
#WLR_LIBS = -Wl,-rpath,$(PWD)/wlroots/build -L$(PWD)/wlroots/build -lwlroots-0.20
|
||||
# WLR_LIBS = -Wl,-rpath,$(PWD)/wlroots/build -L$(PWD)/wlroots/build -lwlroots-0.21
|
||||
|
||||
# Assuming you ran "meson setup --prefix ${PWD}/0.20 build && ninja -C build install"
|
||||
# Assuming you ran "meson setup --prefix ${PWD}/0.21 build && ninja -C build install"
|
||||
#WLR_INCS = -I/usr/include/pixman-1 -I/usr/include/elogind -I/usr/include/libdrm \
|
||||
# -I$(PWD)/wlroots/0.20/include/wlroots-0.20
|
||||
#WLR_LIBS = -Wl,-rpath,$(PWD)/wlroots/0.20/lib64 -L$(PWD)/wlroots/0.20/lib64 -lwlroots-0.20
|
||||
# -I$(PWD)/wlroots/0.21/include/wlroots-0.21
|
||||
#WLR_LIBS = -Wl,-rpath,$(PWD)/wlroots/0.21/lib64 -L$(PWD)/wlroots/0.21/lib64 -lwlroots-0.21
|
||||
|
||||
XWAYLAND =
|
||||
XLIBS =
|
||||
|
||||
@@ -594,7 +594,7 @@ handle_focused_surface_destroy(struct wl_listener *listener,
|
||||
}
|
||||
|
||||
struct input_method_relay *
|
||||
input_method_relay_create()
|
||||
input_method_relay_create(void)
|
||||
{
|
||||
struct input_method_relay *relay = ecalloc(1, sizeof(*relay));
|
||||
wl_list_init(&relay->text_inputs);
|
||||
@@ -625,7 +625,7 @@ void
|
||||
input_method_relay_set_focus(struct input_method_relay *relay,
|
||||
struct wlr_surface *surface)
|
||||
{
|
||||
if (relay->focused_surface == surface)
|
||||
if (!relay || relay->focused_surface == surface)
|
||||
return;
|
||||
|
||||
if (relay->focused_surface)
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <xkbcommon/xkbcommon.h>
|
||||
|
||||
#define MAX(A, B) ((A) > (B) ? (A) : (B))
|
||||
#define MIN(A, B) ((A) < (B) ? (A) : (B))
|
||||
@@ -13,6 +14,8 @@
|
||||
static void die(const char *fmt, ...);
|
||||
static void *ecalloc(size_t nmemb, size_t size);
|
||||
static int fd_set_nonblock(int fd);
|
||||
xkb_keysym_t keymap_get_one_sym_by_level(struct xkb_keymap *keymap,
|
||||
xkb_keycode_t key, xkb_layout_index_t layout, xkb_level_index_t level);
|
||||
|
||||
void
|
||||
die(const char *fmt, ...) {
|
||||
@@ -56,3 +59,12 @@ fd_set_nonblock(int fd) {
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
xkb_keysym_t
|
||||
keymap_get_one_sym_by_level(struct xkb_keymap *keymap, xkb_keycode_t key,
|
||||
xkb_layout_index_t layout, xkb_level_index_t level)
|
||||
{
|
||||
const xkb_keysym_t *syms;
|
||||
int count = xkb_keymap_key_get_syms_by_level(keymap, key, layout, level, &syms);
|
||||
return count ? syms[0] : XKB_KEY_NoSymbol;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user