wtf man, don't corrupt my patches

This commit is contained in:
Adam Jackson 2013-10-25 14:50:24 -04:00
parent 6f1f00f7f0
commit 72ddd37176
4 changed files with 29 additions and 25 deletions

View File

@ -1,6 +1,6 @@
From cef3bbdd16e12c344e40e10ede0e511044e3a8df Mon Sep 17 00:00:00 2001 From 99bc1cf93e274c3f7620d757c5d4fbe40229e810 Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com> From: Adam Jackson <ajax@redhat.com>
Date: Fri, 25 Oct 2013 12:33:38 -0400 Date: Fri, 25 Oct 2013 14:35:36 -0400
Subject: [PATCH] xwayland: Port to new damage API Subject: [PATCH] xwayland: Port to new damage API
Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
@ -15,10 +15,11 @@ index c03855c..0cb4f28 100644
@@ -190,7 +190,6 @@ xwl_unrealize_window(WindowPtr window) @@ -190,7 +190,6 @@ xwl_unrealize_window(WindowPtr window)
xorg_list_del(&xwl_window->link); xorg_list_del(&xwl_window->link);
if (RegionNotEmpty(DamageRegion(xwl_window->damage))) if (RegionNotEmpty(DamageRegion(xwl_window->damage)))
xorg_list_del(&xwl_window->link_damage); xorg_list_del(&xwl_window->link_damage);
- DamageUnregister(&window->drawable, xwl_window->damage); - DamageUnregister(&window->drawable, xwl_window->damage);
DamageDestroy(xwl_window->damage); DamageDestroy(xwl_window->damage);
free(xwl_window); free(xwl_window);
dixSetPrivate(&window->devPrivates, &xwl_window_private_key, NULL); dixSetPrivate(&window->devPrivates, &xwl_window_private_key, NULL);
-- --
1.8.3.1 1.8.3.1

View File

@ -21,11 +21,12 @@ index 20db80c..5045e65 100644
+++ b/hw/xfree86/xwayland/xwayland-window.c +++ b/hw/xfree86/xwayland/xwayland-window.c
@@ -80,7 +80,6 @@ xwl_window_attach(struct xwl_window *xwl_window, PixmapPtr pixmap) @@ -80,7 +80,6 @@ xwl_window_attach(struct xwl_window *xwl_window, PixmapPtr pixmap)
wl_surface_damage(xwl_window->surface, 0, 0, wl_surface_damage(xwl_window->surface, 0, 0,
pixmap->drawable.width, pixmap->drawable.width,
pixmap->drawable.height); pixmap->drawable.height);
- wl_surface_commit(xwl_window->surface); - wl_surface_commit(xwl_window->surface);
callback = wl_display_sync(xwl_screen->display); callback = wl_display_sync(xwl_screen->display);
wl_callback_add_listener(callback, &free_pixmap_listener, pixmap); wl_callback_add_listener(callback, &free_pixmap_listener, pixmap);
-- --
1.8.3.1 1.8.3.1

View File

@ -16,17 +16,17 @@ index 5045e65..c03855c 100644
#include <sys/mman.h> #include <sys/mman.h>
#include <wayland-client.h> #include <wayland-client.h>
-#include <X11/extensions/compositeproto.h> -#include <X11/extensions/compositeproto.h>
#include <xf86Crtc.h> #include <xf86Crtc.h>
#include <selection.h> #include <selection.h>
-#include <compositeext.h> -#include <compositeext.h>
#include <exevents.h> #include <exevents.h>
#include "xwayland.h" #include "xwayland.h"
@@ -86,49 +84,6 @@ xwl_window_attach(struct xwl_window *xwl_window, PixmapPtr pixmap) @@ -86,49 +84,6 @@ xwl_window_attach(struct xwl_window *xwl_window, PixmapPtr pixmap)
pixmap->refcnt++; pixmap->refcnt++;
} }
-static Bool -static Bool
-xwl_create_window(WindowPtr window) -xwl_create_window(WindowPtr window)
-{ -{
@ -75,8 +75,8 @@ index 5045e65..c03855c 100644
{ {
@@ -290,12 +245,6 @@ xwl_screen_init_window(struct xwl_screen *xwl_screen, ScreenPtr screen) @@ -290,12 +245,6 @@ xwl_screen_init_window(struct xwl_screen *xwl_screen, ScreenPtr screen)
if (!dixRegisterPrivateKey(&xwl_window_private_key, PRIVATE_WINDOW, 0)) if (!dixRegisterPrivateKey(&xwl_window_private_key, PRIVATE_WINDOW, 0))
return BadAlloc; return BadAlloc;
- xwl_screen->CreateWindow = screen->CreateWindow; - xwl_screen->CreateWindow = screen->CreateWindow;
- screen->CreateWindow = xwl_create_window; - screen->CreateWindow = xwl_create_window;
- -
@ -85,6 +85,7 @@ index 5045e65..c03855c 100644
- -
xwl_screen->RealizeWindow = screen->RealizeWindow; xwl_screen->RealizeWindow = screen->RealizeWindow;
screen->RealizeWindow = xwl_realize_window; screen->RealizeWindow = xwl_realize_window;
-- --
1.8.3.1 1.8.3.1

View File

@ -15,17 +15,17 @@ index d031b34..ebf1af1 100644
@@ -143,7 +143,10 @@ xwl_keyboard_proc(DeviceIntPtr device, int what) @@ -143,7 +143,10 @@ xwl_keyboard_proc(DeviceIntPtr device, int what)
switch (what) { switch (what) {
case DEVICE_INIT: case DEVICE_INIT:
device->public.on = FALSE; device->public.on = FALSE;
- len = strnlen(xwl_seat->keymap, xwl_seat->keymap_size); - len = strnlen(xwl_seat->keymap, xwl_seat->keymap_size);
+ if (xwl_seat->keymap) + if (xwl_seat->keymap)
+ len = strnlen(xwl_seat->keymap, xwl_seat->keymap_size); + len = strnlen(xwl_seat->keymap, xwl_seat->keymap_size);
+ else + else
+ len = 0; + len = 0;
if (!InitKeyboardDeviceStructFromString(device, xwl_seat->keymap, if (!InitKeyboardDeviceStructFromString(device, xwl_seat->keymap,
len, len,
NULL, xwl_keyboard_control)) NULL, xwl_keyboard_control))
@@ -453,12 +456,42 @@ keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard, @@ -453,12 +456,42 @@ keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard,
uint32_t format, int fd, uint32_t size) uint32_t format, int fd, uint32_t size)
{ {
struct xwl_seat *xwl_seat = data; struct xwl_seat *xwl_seat = data;
+ DeviceIntPtr master; + DeviceIntPtr master;
@ -34,7 +34,7 @@ index d031b34..ebf1af1 100644
+ +
+ if (xwl_seat->keymap) + if (xwl_seat->keymap)
+ munmap(xwl_seat->keymap, xwl_seat->keymap_size); + munmap(xwl_seat->keymap, xwl_seat->keymap_size);
xwl_seat->keymap_size = size; xwl_seat->keymap_size = size;
xwl_seat->keymap = mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0); xwl_seat->keymap = mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0);
- if (xwl_seat->keymap == MAP_FAILED) - if (xwl_seat->keymap == MAP_FAILED)
@ -64,23 +64,24 @@ index d031b34..ebf1af1 100644
+ XkbDeviceApplyKeymap(master, xkb); + XkbDeviceApplyKeymap(master, xkb);
+ +
+ XkbFreeKeyboard(xkb, XkbAllComponentsMask, TRUE); + XkbFreeKeyboard(xkb, XkbAllComponentsMask, TRUE);
+ out: + out:
close(fd); close(fd);
} }
diff --git a/include/input.h b/include/input.h diff --git a/include/input.h b/include/input.h
index 6573a3a..1edcedc 100644 index 6573a3a..1edcedc 100644
--- a/include/input.h --- a/include/input.h
+++ b/include/input.h +++ b/include/input.h
@@ -508,7 +508,7 @@ extern int AttachDevice(ClientPtr client, @@ -508,7 +508,7 @@ extern int AttachDevice(ClientPtr client,
DeviceIntPtr slave, DeviceIntPtr master); DeviceIntPtr slave, DeviceIntPtr master);
extern _X_EXPORT DeviceIntPtr GetPairedDevice(DeviceIntPtr kbd); extern _X_EXPORT DeviceIntPtr GetPairedDevice(DeviceIntPtr kbd);
-extern DeviceIntPtr GetMaster(DeviceIntPtr dev, int type); -extern DeviceIntPtr GetMaster(DeviceIntPtr dev, int type);
+extern _X_EXPORT DeviceIntPtr GetMaster(DeviceIntPtr dev, int type); +extern _X_EXPORT DeviceIntPtr GetMaster(DeviceIntPtr dev, int type);
extern _X_EXPORT int AllocDevicePair(ClientPtr client, extern _X_EXPORT int AllocDevicePair(ClientPtr client,
const char *name, const char *name,
-- --
1.8.3.1 1.8.3.1