xwayland-input: Remove our XYToWindow handler
This was built as a hack for simple Wayland compositors like Weston
which were lazy and didn't want to configure windows server-side when
moved.
Since comboboxes and menus are separate toplevel O-R windows, this hack
breaks input as it needs to be traced normally, not simply sent to the
focused window.
X11 toolkits really do need their windows to be configured correctly
for their O-R windows comboboxes or menus other things, so let's fix
the lazy compositors and remove this.
I have tested this patch with both Weston and Mutter and neither of
them require any changes, and it fixes comboboxes and menus.
If somebody then wants to revert 73698d4
, that's fine by me, so we
reduce the amount of API that DDXen have.
Signed-off-by: Jasper St. Pierre <jstpierre@mecheye.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
58d54ee82d
commit
c1565f3ca6
|
@ -638,37 +638,6 @@ DDXRingBell(int volume, int pitch, int duration)
|
|||
{
|
||||
}
|
||||
|
||||
static WindowPtr
|
||||
xwl_xy_to_window(ScreenPtr screen, SpritePtr sprite, int x, int y)
|
||||
{
|
||||
struct xwl_seat *xwl_seat = NULL;
|
||||
DeviceIntPtr device;
|
||||
|
||||
for (device = inputInfo.devices; device; device = device->next) {
|
||||
if (device->deviceProc == xwl_pointer_proc &&
|
||||
device->spriteInfo->sprite == sprite) {
|
||||
xwl_seat = device->public.devicePrivate;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (xwl_seat == NULL) {
|
||||
/* XTEST device */
|
||||
sprite->spriteTraceGood = 1;
|
||||
return sprite->spriteTrace[0];
|
||||
}
|
||||
|
||||
if (xwl_seat->focus_window) {
|
||||
sprite->spriteTraceGood = 2;
|
||||
sprite->spriteTrace[1] = xwl_seat->focus_window->window;
|
||||
return miSpriteTrace(sprite, x, y);
|
||||
}
|
||||
else {
|
||||
sprite->spriteTraceGood = 1;
|
||||
return sprite->spriteTrace[0];
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
InitInput(int argc, char *argv[])
|
||||
{
|
||||
|
@ -681,9 +650,6 @@ InitInput(int argc, char *argv[])
|
|||
wl_registry_add_listener(xwl_screen->input_registry, &input_listener,
|
||||
xwl_screen);
|
||||
|
||||
xwl_screen->XYToWindow = pScreen->XYToWindow;
|
||||
pScreen->XYToWindow = xwl_xy_to_window;
|
||||
|
||||
xwl_screen->expecting_event = 0;
|
||||
wl_display_roundtrip(xwl_screen->display);
|
||||
while (xwl_screen->expecting_event)
|
||||
|
|
|
@ -62,7 +62,6 @@ struct xwl_screen {
|
|||
DestroyWindowProcPtr DestroyWindow;
|
||||
RealizeWindowProcPtr RealizeWindow;
|
||||
UnrealizeWindowProcPtr UnrealizeWindow;
|
||||
XYToWindowProcPtr XYToWindow;
|
||||
|
||||
struct xorg_list output_list;
|
||||
struct xorg_list seat_list;
|
||||
|
|
Loading…
Reference in New Issue
Block a user