Re: [PATCH spice-gtk] Fix non-tablet non-vd-agent erratic mouse motion RH#1285378

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

>I will try to fix the Wayland issue (in fact unrelated to this patch)

As tested on:
        SDL2-2.0.5-4.fc26.x86_64
        xorg-x11-server-Xwayland-1.19.3-4.fc26.x86_64
        weston-2.0.0-1.fc26.x86_64
        xorg-x11-server-Xorg-1.19.3-4.fc26.x86_64

The attached mouse grab behavior reproducer utilizing how it is implemented on
SDL2 does work great on X11.

Not so on Wayland - on native server (/usr/bin/Xwayland) it sends just one
mouse motion and then it stops. It does work better on X11 server under Weston
but also not perfectly - one has to run 'weston --fullscreen' to test the
mouse motion properly but then Weston itself has a problem with the "wall" one
cannot cross further. (video link: https://youtu.be/AkXC-vXeKaY )

So I believe there is some more work on Wayland to do before one can make
a spice-gtk fix. I can look to fix the Weston "wall" problem first.

Thanks,

Steph
//gcc mouseGrab_sdl.c -o sample -Wall -g `sdl2-config --cflags --libs`


#include <stdio.h>
#include <SDL.h>

int
main (void)
{
  SDL_Window *window = SDL_CreateWindow ("Mousegrab", SDL_WINDOWPOS_CENTERED,
					 SDL_WINDOWPOS_CENTERED, 640, 480,
					 SDL_WINDOW_SHOWN);

  SDL_SetWindowGrab (window, SDL_TRUE);
//printf("SDL_CaptureMouse=%d\n",SDL_CaptureMouse(SDL_TRUE));
  printf ("SDL_SetRelativeMouseMode=%d\n",
	  SDL_SetRelativeMouseMode (SDL_TRUE));

  SDL_Event e;
  int quit = 0;
  while (!quit)
    {
      while (SDL_PollEvent (&e))
	{
	  if (e.type == SDL_MOUSEMOTION)
	    printf ("x=%u y=%u xrel=%+d yrel=%+d\n", e.motion.x, e.motion.y,
		    e.motion.xrel, e.motion.yrel);
	  if (e.type == SDL_KEYDOWN)
	    quit = 1;
	}
    }
  SDL_Quit ();
  return 0;
}
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]