aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend/drm/drm.c2
-rw-r--r--backend/multi/backend.c2
-rw-r--r--examples/meson.build9
-rw-r--r--rootston/output.c3
-rw-r--r--types/wlr_text_input_v3.c7
-rw-r--r--xwayland/xwm.c19
6 files changed, 28 insertions, 14 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index 1313e7fe..0b624717 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -1,4 +1,4 @@
-#define _POSIX_C_SOURCE 199309L
+#define _POSIX_C_SOURCE 200112L
#include <assert.h>
#include <drm_mode.h>
#include <EGL/egl.h>
diff --git a/backend/multi/backend.c b/backend/multi/backend.c
index cefaa361..50851109 100644
--- a/backend/multi/backend.c
+++ b/backend/multi/backend.c
@@ -1,4 +1,4 @@
-#define _POSIX_C_SOURCE 199309L
+#define _POSIX_C_SOURCE 200112L
#include <assert.h>
#include <stdbool.h>
#include <stdlib.h>
diff --git a/examples/meson.build b/examples/meson.build
index 13985e27..369c7049 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -6,6 +6,13 @@ libavutil = dependency('libavutil', version: '>=56.14.100', required: false)
libavcodec = dependency('libavcodec', version: '>=58.18.100', required: false)
libavformat = dependency('libavformat', version: '>=58.12.100', required: false)
+# epoll is a separate library in FreeBSD
+if host_machine.system() == 'freebsd'
+ libepoll = [dependency('epoll-shim')]
+else
+ libepoll = []
+endif
+
# Small hack until https://github.com/mesonbuild/meson/pull/3386/ is merged
foreach dep : ['libpng', 'libavutil', 'libavcodec', 'libavformat']
if not get_variable(dep).found()
@@ -97,7 +104,7 @@ examples = {
},
'input-method': {
'src': 'input-method.c',
- 'dep': [wayland_client, wlr_protos, wlroots],
+ 'dep': [wayland_client, wlr_protos, wlroots] + libepoll,
},
'text-input': {
'src': 'text-input.c',
diff --git a/rootston/output.c b/rootston/output.c
index 9d376f8e..bd38f3ab 100644
--- a/rootston/output.c
+++ b/rootston/output.c
@@ -459,7 +459,8 @@ static void render_output(struct roots_output *output) {
output_box->y;
view_move(view, view_x, view_y);
- if (has_standalone_surface(view)) {
+ if (has_standalone_surface(view) &&
+ wl_list_empty(&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY])) {
wlr_output_set_fullscreen_surface(wlr_output, view->wlr_surface);
} else {
wlr_output_set_fullscreen_surface(wlr_output, NULL);
diff --git a/types/wlr_text_input_v3.c b/types/wlr_text_input_v3.c
index 52c0fcc9..6ec0762a 100644
--- a/types/wlr_text_input_v3.c
+++ b/types/wlr_text_input_v3.c
@@ -175,11 +175,10 @@ static void text_input_commit(struct wl_client *client,
text_input->current_enabled = text_input->pending_enabled;
text_input->current_serial++;
- if (text_input->current_enabled && text_input->focused_surface == NULL) {
- wl_resource_post_error(text_input->resource, 0, "Text input was not"
- "entered, and cannot be enabled\n");
- return;
+ if (text_input->focused_surface == NULL) {
+ wlr_log(WLR_DEBUG, "Text input commit received without focus\n");
}
+
if (!old_enabled && text_input->current_enabled) {
wlr_signal_emit_safe(&text_input->events.enable, text_input);
} else if (old_enabled && !text_input->current_enabled) {
diff --git a/xwayland/xwm.c b/xwayland/xwm.c
index fce61f6b..474b53d0 100644
--- a/xwayland/xwm.c
+++ b/xwayland/xwm.c
@@ -803,8 +803,6 @@ static void xwm_handle_destroy_notify(struct wlr_xwm *xwm,
static void xwm_handle_configure_request(struct wlr_xwm *xwm,
xcb_configure_request_event_t *ev) {
- wlr_log(WLR_DEBUG, "XCB_CONFIGURE_REQUEST (%u) [%ux%u+%d,%d]", ev->window,
- ev->width, ev->height, ev->x, ev->y);
struct wlr_xwayland_surface *surface = lookup_surface(xwm, ev->window);
if (surface == NULL) {
return;
@@ -812,13 +810,22 @@ static void xwm_handle_configure_request(struct wlr_xwm *xwm,
// TODO: handle ev->{parent,sibling}?
+ uint16_t mask = ev->value_mask;
+ uint16_t geo_mask = XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y |
+ XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT;
+ if ((mask & geo_mask) == 0) {
+ return;
+ }
+
struct wlr_xwayland_surface_configure_event wlr_event = {
.surface = surface,
- .x = ev->x,
- .y = ev->y,
- .width = ev->width,
- .height = ev->height,
+ .x = mask & XCB_CONFIG_WINDOW_X ? ev->x : surface->x,
+ .y = mask & XCB_CONFIG_WINDOW_Y ? ev->y : surface->y,
+ .width = mask & XCB_CONFIG_WINDOW_WIDTH ? ev->width : surface->width,
+ .height = mask & XCB_CONFIG_WINDOW_HEIGHT ? ev->height : surface->height,
};
+ wlr_log(WLR_DEBUG, "XCB_CONFIGURE_REQUEST (%u) [%ux%u+%d,%d]", ev->window,
+ wlr_event.width, wlr_event.height, wlr_event.x, wlr_event.y);
wlr_signal_emit_safe(&surface->events.request_configure, &wlr_event);
}