| Message ID | 1424548439-20921-1-git-send-email-jstpierre@mecheye.net |
|---|---|
| State | Accepted |
| Commit | c1565f3ca663aa4ba4316d7248737ab817116fbd |
| Headers | show |
diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c index 5e20418..c825ef4 100644 --- a/hw/xwayland/xwayland-input.c +++ b/hw/xwayland/xwayland-input.c @@ -633,37 +633,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[]) { @@ -676,9 +645,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) diff --git a/hw/xwayland/xwayland.h b/hw/xwayland/xwayland.h index bfffa71..ce359d6 100644 --- a/hw/xwayland/xwayland.h +++ b/hw/xwayland/xwayland.h @@ -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;
On 21/02/15 20:53, Jasper St. Pierre wrote: > 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> > --- That one works for me, the problem I had with the previous patch was precisely that it did not need coordinates translations. Cheers, Olivier
On 21 February 2015 at 19:53, Jasper St. Pierre <jstpierre@mecheye.net> wrote: > 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> Acked-by: Daniel Stone <daniels@collabora.com>
On 23 February 2015 at 15:40, Daniel Stone <daniel@fooishbar.org> wrote: > On 21 February 2015 at 19:53, Jasper St. Pierre <jstpierre@mecheye.net> wrote: >> 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> > > Acked-by: Daniel Stone <daniels@collabora.com> Keith, please pick this up, with tags from Olivier and myself. If it's any consolation, further thought has convinced me to upgrade from A-b to R-b. Cheers, Danie
Hi Jasper, Daniel, On 06/04/15 18:52, Daniel Stone wrote: > On 23 February 2015 at 15:40, Daniel Stone <daniel@fooishbar.org> wrote: >> On 21 February 2015 at 19:53, Jasper St. Pierre <jstpierre@mecheye.net> wrote: >>> [...] >>> Signed-off-by: Jasper St. Pierre <jstpierre@mecheye.net> >> >> Acked-by: Daniel Stone <daniels@collabora.com> > > Keith, please pick this up, with tags from Olivier and myself. If it's > any consolation, further thought has convinced me to upgrade from A-b > to R-b. Applied in my tree, will send this later as part of a pull req. to ajax. Cheers, Olivier
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> --- hw/xwayland/xwayland-input.c | 34 ---------------------------------- hw/xwayland/xwayland.h | 1 - 2 files changed, 35 deletions(-)