xwayland: re-enable ashmem patch + remove conflicting ones
%ci:reset-backlog
This commit is contained in:
parent
8afc9f8fa0
commit
890d021b5f
@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Wayland X11 server"
|
||||
TERMUX_PKG_LICENSE="MIT"
|
||||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>"
|
||||
TERMUX_PKG_VERSION=1.20.5
|
||||
#TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://xorg.freedesktop.org/releases/individual/xserver/xorg-server-${TERMUX_PKG_VERSION}.tar.bz2
|
||||
TERMUX_PKG_SHA256=a81d8243f37e75a03d4f8c55f96d0bc25802be6ec45c3bfa5cb614c6d01bac9d
|
||||
TERMUX_PKG_DEPENDS="libandroid-shmem, libdrm, libpciaccess, libpixman, libx11, libxau, libxfont2, libxinerama, libxkbfile, libxshmfence, mesa, openssl, xkeyboard-config, xorg-xkbcomp, libwayland, libwayland-protocols, libepoxy"
|
||||
|
@ -1,13 +0,0 @@
|
||||
diff -uNr xorg-server-1.20.3/hw/xwayland/xwayland-shm.c xorg-server-1.20.3.mod/hw/xwayland/xwayland-shm.c
|
||||
--- xorg-server-1.20.3/hw/xwayland/xwayland-shm.c 2018-10-25 17:13:21.000000000 +0300
|
||||
+++ xorg-server-1.20.3.mod/hw/xwayland/xwayland-shm.c 2019-06-29 15:19:33.153193380 +0300
|
||||
@@ -122,8 +122,7 @@
|
||||
|
||||
path = getenv("XDG_RUNTIME_DIR");
|
||||
if (!path) {
|
||||
- errno = ENOENT;
|
||||
- return -1;
|
||||
+ path = "@TERMUX_PREFIX@/tmp";
|
||||
}
|
||||
|
||||
name = malloc(strlen(path) + sizeof(template));
|
@ -1,59 +0,0 @@
|
||||
+++ ./hw/xwayland/xwayland-output.c 2019-06-28 18:22:41.910491315 +0300
|
||||
@@ -171,6 +171,47 @@
|
||||
return 25.4 / DEFAULT_DPI;
|
||||
}
|
||||
|
||||
+static int
|
||||
+xwl_set_pixmap_visit_window(WindowPtr window, void *data)
|
||||
+{
|
||||
+ ScreenPtr screen = window->drawable.pScreen;
|
||||
+
|
||||
+ if (screen->GetWindowPixmap(window) == data) {
|
||||
+ screen->SetWindowPixmap(window, screen->GetScreenPixmap(screen));
|
||||
+ return WT_WALKCHILDREN;
|
||||
+ }
|
||||
+
|
||||
+ return WT_DONTWALKCHILDREN;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+update_backing_pixmaps(struct xwl_screen *xwl_screen, int width, int height)
|
||||
+{
|
||||
+ ScreenPtr pScreen = xwl_screen->screen;
|
||||
+ WindowPtr pRoot = pScreen->root;
|
||||
+ PixmapPtr old_pixmap, new_pixmap;
|
||||
+
|
||||
+ old_pixmap = pScreen->GetScreenPixmap(pScreen);
|
||||
+ if (old_pixmap)
|
||||
+ pScreen->DestroyPixmap(old_pixmap);
|
||||
+ new_pixmap = pScreen->CreatePixmap(pScreen, width, height,
|
||||
+ pScreen->rootDepth,
|
||||
+ CREATE_PIXMAP_USAGE_BACKING_PIXMAP);
|
||||
+ pScreen->SetScreenPixmap(new_pixmap);
|
||||
+
|
||||
+ if (old_pixmap)
|
||||
+ TraverseTree(pScreen->root, xwl_set_pixmap_visit_window, old_pixmap);
|
||||
+
|
||||
+ old_pixmap = pScreen->GetWindowPixmap(pRoot);
|
||||
+ if (old_pixmap)
|
||||
+ pScreen->DestroyPixmap(old_pixmap);
|
||||
+ new_pixmap = pScreen->CreatePixmap(pScreen, width, height,
|
||||
+ pScreen->rootDepth,
|
||||
+ CREATE_PIXMAP_USAGE_BACKING_PIXMAP);
|
||||
+ pScreen->SetWindowPixmap(pRoot, new_pixmap);
|
||||
+ pScreen->ResizeWindow(pRoot, 0, 0, width, height, NULL);
|
||||
+}
|
||||
+
|
||||
static void
|
||||
update_screen_size(struct xwl_output *xwl_output, int width, int height)
|
||||
{
|
||||
@@ -180,6 +221,9 @@
|
||||
if (xwl_screen->root_clip_mode == ROOT_CLIP_FULL)
|
||||
SetRootClip(xwl_screen->screen, ROOT_CLIP_NONE);
|
||||
|
||||
+ if (!xwl_screen->rootless && xwl_screen->screen->root)
|
||||
+ update_backing_pixmaps (xwl_screen, width, height);
|
||||
+
|
||||
xwl_screen->width = width;
|
||||
xwl_screen->height = height;
|
||||
xwl_screen->screen->width = width;
|
Loading…
Reference in New Issue
Block a user