-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rebase; fix disable IME envvar, add new wayland-childwindow patchset, improve cursor clipping hack (again), add a ton of winex11 patches (rbernon) and improve gnome 60hz bug fix patch (0003-winex11-Xshape-GNOME-workaround.patch)
- Loading branch information
Showing
97 changed files
with
5,903 additions
and
1,527 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 0 additions & 42 deletions
42
...6107-wayland-child/0000-Revert-winewayland-Remove-now-unnecessary-WindowPosChanging.patch
This file was deleted.
Oops, something went wrong.
123 changes: 123 additions & 0 deletions
123
...kports/6107-wayland-child/0001-winewayland-Store-all-window-rects-in-wayland_win_da.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
From 719de91abf6e5cf328adc0402f87957664537e01 Mon Sep 17 00:00:00 2001 | ||
From: Alexandros Frantzis <[email protected]> | ||
Date: Thu, 11 Jul 2024 14:47:41 +0300 | ||
Subject: [PATCH 1/7] winewayland: Store all window rects in wayland_win_data. | ||
|
||
This allows wayland_win_data_update_wayland_surface() to be called | ||
outside of WAYLAND_WindowPosChange, which will be needed in upcoming | ||
commits. | ||
--- | ||
dlls/winewayland.drv/waylanddrv.h | 5 +---- | ||
dlls/winewayland.drv/window.c | 26 ++++++++++++-------------- | ||
2 files changed, 13 insertions(+), 18 deletions(-) | ||
|
||
diff --git a/dlls/winewayland.drv/waylanddrv.h b/dlls/winewayland.drv/waylanddrv.h | ||
index 5bde94a0ac9..3ac3865efd2 100644 | ||
--- a/dlls/winewayland.drv/waylanddrv.h | ||
+++ b/dlls/winewayland.drv/waylanddrv.h | ||
@@ -290,10 +290,7 @@ struct wayland_win_data | ||
struct wayland_surface *wayland_surface; | ||
/* wine window_surface backing this window */ | ||
struct window_surface *window_surface; | ||
- /* USER window rectangle relative to win32 parent window client area */ | ||
- RECT window_rect; | ||
- /* USER client rectangle relative to win32 parent window client area */ | ||
- RECT client_rect; | ||
+ struct window_rects rects; | ||
BOOL managed; | ||
}; | ||
|
||
diff --git a/dlls/winewayland.drv/window.c b/dlls/winewayland.drv/window.c | ||
index 233ca0e5a62..9e228b779f9 100644 | ||
--- a/dlls/winewayland.drv/window.c | ||
+++ b/dlls/winewayland.drv/window.c | ||
@@ -76,9 +76,7 @@ static struct rb_tree win_data_rb = { wayland_win_data_cmp_rb }; | ||
* | ||
* Create a data window structure for an existing window. | ||
*/ | ||
-static struct wayland_win_data *wayland_win_data_create(HWND hwnd, | ||
- const RECT *window_rect, | ||
- const RECT *client_rect) | ||
+static struct wayland_win_data *wayland_win_data_create(HWND hwnd, struct window_rects *rects) | ||
{ | ||
struct wayland_win_data *data; | ||
struct rb_entry *rb_entry; | ||
@@ -92,8 +90,7 @@ static struct wayland_win_data *wayland_win_data_create(HWND hwnd, | ||
if (!(data = calloc(1, sizeof(*data)))) return NULL; | ||
|
||
data->hwnd = hwnd; | ||
- data->window_rect = *window_rect; | ||
- data->client_rect = *client_rect; | ||
+ data->rects = *rects; | ||
|
||
pthread_mutex_lock(&win_data_mutex); | ||
|
||
@@ -167,8 +164,8 @@ static void wayland_win_data_get_config(struct wayland_win_data *data, | ||
enum wayland_surface_config_state window_state = 0; | ||
DWORD style; | ||
|
||
- conf->rect = data->window_rect; | ||
- conf->client_rect = data->client_rect; | ||
+ conf->rect = data->rects.window; | ||
+ conf->client_rect = data->rects.client; | ||
style = NtUserGetWindowLongW(data->hwnd, GWL_STYLE); | ||
|
||
TRACE("window=%s style=%#lx\n", wine_dbgstr_rect(&conf->rect), (long)style); | ||
@@ -200,14 +197,14 @@ static void reapply_cursor_clipping(void) | ||
NtUserSetThreadDpiAwarenessContext(context); | ||
} | ||
|
||
-static void wayland_win_data_update_wayland_surface(struct wayland_win_data *data, const RECT *visible_rect) | ||
+static void wayland_win_data_update_wayland_surface(struct wayland_win_data *data) | ||
{ | ||
struct wayland_surface *surface = data->wayland_surface; | ||
HWND parent = NtUserGetAncestor(data->hwnd, GA_PARENT); | ||
BOOL visible, xdg_visible; | ||
WCHAR text[1024]; | ||
|
||
- TRACE("hwnd=%p, rect=%s\n", data->hwnd, wine_dbgstr_rect(visible_rect)); | ||
+ TRACE("hwnd=%p\n", data->hwnd); | ||
|
||
/* We don't want wayland surfaces for child windows. */ | ||
if (parent != NtUserGetDesktopWindow() && parent != 0) | ||
@@ -251,7 +248,8 @@ static void wayland_win_data_update_wayland_surface(struct wayland_win_data *dat | ||
pthread_mutex_unlock(&surface->mutex); | ||
|
||
if (data->window_surface) | ||
- wayland_window_surface_update_wayland_surface(data->window_surface, visible_rect, surface); | ||
+ wayland_window_surface_update_wayland_surface(data->window_surface, | ||
+ &data->rects.visible, surface); | ||
|
||
/* Size/position changes affect the effective pointer constraint, so update | ||
* it as needed. */ | ||
@@ -433,7 +431,8 @@ BOOL WAYLAND_WindowPosChanging(HWND hwnd, UINT swp_flags, BOOL shaped, struct wi | ||
|
||
TRACE("hwnd %p, swp_flags %04x, shaped %u, rects %s\n", hwnd, swp_flags, shaped, debugstr_window_rects(rects)); | ||
|
||
- if (!data && !(data = wayland_win_data_create(hwnd, &rects->window, &rects->client))) return FALSE; /* use default surface */ | ||
+ if (!data && !(data = wayland_win_data_create(hwnd, rects))) return FALSE; | ||
+ | ||
wayland_win_data_release(data); | ||
|
||
return TRUE; | ||
@@ -458,15 +457,14 @@ void WAYLAND_WindowPosChanged(HWND hwnd, HWND insert_after, UINT swp_flags, cons | ||
|
||
if (!(data = wayland_win_data_get(hwnd))) return; | ||
|
||
- data->window_rect = new_rects->window; | ||
- data->client_rect = new_rects->client; | ||
+ data->rects = *new_rects; | ||
data->managed = managed; | ||
|
||
if (surface) window_surface_add_ref(surface); | ||
if (data->window_surface) window_surface_release(data->window_surface); | ||
data->window_surface = surface; | ||
|
||
- wayland_win_data_update_wayland_surface(data, &new_rects->visible); | ||
+ wayland_win_data_update_wayland_surface(data); | ||
if (data->wayland_surface) wayland_win_data_update_wayland_state(data); | ||
|
||
wayland_win_data_release(data); | ||
-- | ||
2.46.0 | ||
|
103 changes: 0 additions & 103 deletions
103
...ackports/6107-wayland-child/0001-winewayland-Store-visible_rect-in-wayland_win_data.patch
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
From 8fb239e8dda6305bc059e650443593d83e703f6e Mon Sep 17 00:00:00 2001 | ||
From 7bcbaa02ba4035cab9cc42c793487bd2cf8dec59 Mon Sep 17 00:00:00 2001 | ||
From: Alexandros Frantzis <[email protected]> | ||
Date: Thu, 11 Jul 2024 17:36:39 +0300 | ||
Subject: [PATCH 2/8] winewayland: Create subsurfaces for child windows. | ||
Subject: [PATCH 2/7] winewayland: Create subsurfaces for child windows. | ||
|
||
Create (possibly nested) Wayland subsurfaces for all child windows, | ||
to allow GL/VK contents to be presented onto them. | ||
--- | ||
dlls/winewayland.drv/wayland_surface.c | 61 +++++++++++++++++++++++ | ||
dlls/winewayland.drv/waylanddrv.h | 12 +++++ | ||
dlls/winewayland.drv/window.c | 69 +++++++++++++++++--------- | ||
3 files changed, 119 insertions(+), 23 deletions(-) | ||
dlls/winewayland.drv/window.c | 67 +++++++++++++++++--------- | ||
3 files changed, 117 insertions(+), 23 deletions(-) | ||
|
||
diff --git a/dlls/winewayland.drv/wayland_surface.c b/dlls/winewayland.drv/wayland_surface.c | ||
index 39c3976cdfd..de3307ec51e 100644 | ||
|
@@ -109,7 +109,7 @@ index 39c3976cdfd..de3307ec51e 100644 | |
/* Ensure no buffer is attached, otherwise future role assignments may fail. */ | ||
wl_surface_attach(surface->wl_surface, NULL, 0, 0); | ||
diff --git a/dlls/winewayland.drv/waylanddrv.h b/dlls/winewayland.drv/waylanddrv.h | ||
index c25f5775762..87d071707a8 100644 | ||
index 3ac3865efd2..22e8b27df82 100644 | ||
--- a/dlls/winewayland.drv/waylanddrv.h | ||
+++ b/dlls/winewayland.drv/waylanddrv.h | ||
@@ -73,6 +73,13 @@ enum wayland_surface_config_state | ||
|
@@ -153,10 +153,10 @@ index c25f5775762..87d071707a8 100644 | |
void wayland_surface_attach_shm(struct wayland_surface *surface, | ||
struct wayland_shm_buffer *shm_buffer, | ||
diff --git a/dlls/winewayland.drv/window.c b/dlls/winewayland.drv/window.c | ||
index fda7139283f..9be98363ac8 100644 | ||
index 9e228b779f9..9d0e649f9d6 100644 | ||
--- a/dlls/winewayland.drv/window.c | ||
+++ b/dlls/winewayland.drv/window.c | ||
@@ -134,19 +134,32 @@ static void wayland_win_data_destroy(struct wayland_win_data *data) | ||
@@ -129,19 +129,32 @@ static void wayland_win_data_destroy(struct wayland_win_data *data) | ||
} | ||
|
||
/*********************************************************************** | ||
|
@@ -194,14 +194,14 @@ index fda7139283f..9be98363ac8 100644 | |
pthread_mutex_unlock(&win_data_mutex); | ||
|
||
return NULL; | ||
@@ -205,38 +218,42 @@ static void reapply_cursor_clipping(void) | ||
@@ -200,38 +213,40 @@ static void reapply_cursor_clipping(void) | ||
static void wayland_win_data_update_wayland_surface(struct wayland_win_data *data) | ||
{ | ||
struct wayland_surface *surface = data->wayland_surface; | ||
- HWND parent = NtUserGetAncestor(data->hwnd, GA_PARENT); | ||
- BOOL visible, xdg_visible; | ||
+ struct wayland_win_data *parent_data; | ||
+ enum wayland_surface_role role; | ||
+ enum wayland_surface_role role = WAYLAND_SURFACE_ROLE_NONE; | ||
WCHAR text[1024]; | ||
|
||
TRACE("hwnd=%p\n", data->hwnd); | ||
|
@@ -216,13 +216,11 @@ index fda7139283f..9be98363ac8 100644 | |
- surface = NULL; | ||
- goto out; | ||
+ parent_data = wayland_win_data_get_nolock(NtUserGetAncestor(data->hwnd, GA_PARENT)); | ||
+ if (parent_data && parent_data->wayland_surface) | ||
+ role = WAYLAND_SURFACE_ROLE_SUBSURFACE; | ||
+ else | ||
+ if (!parent_data) | ||
+ role = WAYLAND_SURFACE_ROLE_TOPLEVEL; | ||
+ else if (parent_data->wayland_surface) | ||
+ role = WAYLAND_SURFACE_ROLE_SUBSURFACE; | ||
} | ||
+ else | ||
+ role = WAYLAND_SURFACE_ROLE_NONE; | ||
|
||
- /* Otherwise ensure that we have a wayland surface. */ | ||
- if (!surface && !(surface = wayland_surface_create(data->hwnd))) return; | ||
|
@@ -255,7 +253,7 @@ index fda7139283f..9be98363ac8 100644 | |
{ | ||
wayland_surface_make_toplevel(surface); | ||
if (surface->xdg_toplevel) | ||
@@ -246,6 +263,12 @@ static void wayland_win_data_update_wayland_surface(struct wayland_win_data *dat | ||
@@ -241,6 +256,12 @@ static void wayland_win_data_update_wayland_surface(struct wayland_win_data *dat | ||
wayland_surface_set_title(surface, text); | ||
} | ||
} | ||
|
Oops, something went wrong.