1. 28 Sep, 2022 1 commit
  2. 20 Sep, 2022 1 commit
  3. 13 Sep, 2022 1 commit
    • Olivier Fourdan's avatar
      xwayland: Prevent Xserver grabs with rootless · a77d95af
      Olivier Fourdan authored and Olivier Fourdan's avatar Olivier Fourdan committed
      
      
      Because of the design of most Wayland compositors, where the compositor
      is both a Wayland server and an X11 window manager, any X11 client
      issuing a server grab (i.e. XGrabServer()) can possibly hang the whole
      desktop when Xwayland is running rootless.
      
      This can happen with e.g. ImageMagick's import command with mutter.
      
      1. "import" is launched and issues an XServerGrab(),
      2. Xwayland restricts access to that "import" X11 client alone,
      3. mutter continues to process events until it needs to sync with
         Xwayland (there's variability in time before the hang occurs),
      4. When mutter does an XSync() (explicitly or implicitly through some
         other Xlib call), it will stop waiting for Xwayland to reply,
      5. Xwayland waits for the XServerGrab() to be released by import,
      6. "import" waits for a user input to release the XServerGrab(),
      7. mutter is stuck waiting on Xwayland and does not process input
         events...
      
      To prevent this, re-route the GrabServer/UngrabServer requests and
      pretend the grab works but actually does nothing at all for all clients
      but the X11 window manager (which can still issue X11 server grabs, at
      its own risks).
      
      Signed-off-by: Olivier Fourdan's avatarOlivier Fourdan <ofourdan@redhat.com>
      Reviewed-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
      Closes: https://bugzilla.redhat.com/1914021
      a77d95af
  4. 07 Sep, 2022 1 commit
    • coypoop's avatar
      Simplify auto device configuration for choosing wsfb, fbdev · 399cf127
      coypoop authored and Alan Coopersmith's avatar Alan Coopersmith committed
      I wanted to simplify the logic, and thought this is a good opportunity
      to eliminate local diffs.
      
      I don't want to list OSes without wsfb, because I understand that is a
      netbsd/openbsd driver, and always have it as a fallback for us.
      
      Additionally, I understand "fbdev" is linux-specific, so have the logic
      match this intent.
      399cf127
  5. 19 Aug, 2022 1 commit
  6. 11 Aug, 2022 1 commit
    • Peter Hutterer's avatar
      xwayland: add support for the XWAYLAND extension · 2700bc60
      Peter Hutterer authored
      This extension exists to serve one purpose: reliably identifying
      Xwayland. Previous attempts at doing so included querying root window
      properties, output names or input device names. All these attempts are
      somewhat unreliable. Instead, let's use an extension - where that
      extension is present we have an Xwayland server.
      
      Clients should never need to do anything but check whether the extension
      exists through XQueryExtension or search through XListExtensions.
      
      This extension provides a single QueryVersion request only, and
      that is only to provide future compatibility if we ever need anything
      other than "this extension exists" functionality.
      
      xorg/proto/xorgproto!54
      
      
      
      Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
      2700bc60
  7. 02 Aug, 2022 1 commit
  8. 26 Jul, 2022 1 commit
    • Olivier Fourdan's avatar
      xwayland: Fix "-force-xrandr-emulation" · 24d7d93f
      Olivier Fourdan authored
      Commit 7cdcdfea
      
       introduced a new command line option
      "-force-xrandr-emulation", however it is missing from the
      ddxProcessArgument().
      
      As a result, trying to use that command option would result in a error:
      
      (EE) Unrecognized option: -force-xrandr-emulation
      
      Make sure "-force-xrandr-emulation" is accounted for in Xwayland's
      ddxProcessArgument().
      
      Signed-off-by: Olivier Fourdan's avatarOlivier Fourdan <ofourdan@redhat.com>
      Fixes: 7cdcdfea - xwayland: Add -force-xrandr-emulation switch
      24d7d93f
  9. 04 Jul, 2022 1 commit
  10. 02 Jul, 2022 2 commits
  11. 01 Jul, 2022 1 commit
  12. 30 Jun, 2022 19 commits
  13. 27 Jun, 2022 3 commits
    • Adam Jackson's avatar
      ephyr: Sync even less in ephyrInternalDamageRedisplay · cf30498f
      Adam Jackson authored
      If we have multiple damage rects we would sync (if we would sync) after
      every hostx_paint_rect. For shm images you'd rather push all the
      ShmPutImage requests and wait after the last one.
      
            before                  after   Operation
      ------------   --------------------   -------------------------
       232000000.0    240000000.0 (1.034)   Dot
        41500000.0     41400000.0 (0.998)   1x1 rectangle
        11400000.0     11400000.0 (1.000)   10x10 rectangle
          553000.0       553000.0 (1.000)   100x100 rectangle
           37300.0        38500.0 (1.032)   500x500 rectangle
          831000.0      1140000.0 (1.372)   PutImage 10x10 square
           65200.0       134000.0 (2.055)   PutImage 100x100 square
            3410.0         3500.0 (1.026)   PutImage 500x500 square
          810000.0      1150000.0 (1.420)   ShmPutImage 10x10 square
          346000.0       364000.0 (1.052)   ShmPutImage 100x100 square
           22400.0        22800.0 (1.018)   ShmPutImage 500x500 square
      
      Reviewed-by: Emma Anholt <em...
      cf30498f
    • Adam Jackson's avatar
      ephyr: Sync less in hostx_paint_rect · 7f884899
      Adam Jackson authored
      
      
      Move the xcb_aux_sync into the shm path, where we do still need it to
      synchronize access with the host. In the non-shm path the image is
      copied to the host anyway so the sync just adds latency and keeps you
      from using all your network bandwidth.
      
      Only the non-shm-putimage path benefits from this, but the benefit is
      significant even on the local machine (here a 3.2GHz Core i7-8700, using
      XEPHYR_NO_SHM=1):
      
            before                  after   Operation
      ------------   --------------------   -------------------------
       228000000.0    225000000.0 (0.987)   Dot
        40900000.0     41600000.0 (1.017)   1x1 rectangle
        10400000.0     10700000.0 (1.029)   10x10 rectangle
          477000.0       471000.0 (0.987)   100x100 rectangle
           30900.0        31800.0 (1.029)   500x500 rectangle
          760000.0       981000.0 (1.291)   PutImage 10x10 square
           14700.0        19200.0 (1.306)   PutImage 100x100 square
             320.0          382.0 (1.194)   PutImage 500x500 square
          749000.0       984000.0 (1.314)   ShmPutImage 10x10 square
          268000.0       304000.0 (1.134)   ShmPutImage 100x100 square
           16600.0        18500.0 (1.114)   ShmPutImage 500x500 square
      
      Reviewed-by: Emma Anholt's avatarEmma Anholt <emma@anholt.net>
      7f884899
    • Morose's avatar
      xwayland: Fix check logic in sprite_check_lost_focus() · 92a00f52
      Morose authored and Olivier Fourdan's avatar Olivier Fourdan committed
      When the pointer leaves an X11 window, and enters a Wayland native
      window, Xwayland has no idea about Wayland native windows and may
      generate the wrong crossing events to another X11 window instead.
      
      To avoid that issue, Xwayland implements its own XYToWindow() handler to
      compare the Wayland focused surface with the X11 window found in the
      window tree.
      
      Commit 59ad0e6a
      
       ("xwayland: Fix use after free of cursors") changed the
      logic in sprite_check_lost_focus() to use IsParent() to compare the
      windows, which works when the X11 window is reparented by the window
      manager, but fails in the case of an override redirect window.
      
      To fix the issue, also check whether last_xwindow is the window itself.
      
      Signed-off-by: default avatarMorose <chenlinxiang@kylinos.cn>
      Fixes: 59ad0e6a
      
       - xwayland: Fix use after free of cursors
      Reviewed-by: Olivier Fourdan's avatarOlivier Fourdan <ofourdan@redhat.com>
      92a00f52
  14. 26 Jun, 2022 5 commits
  15. 21 Jun, 2022 1 commit