1. 17 Jun, 2019 6 commits
    • Jon Turney's avatar
      hw/xwin: Set convenience variables for WM_CREATE as well · 2e1bc743
      Jon Turney authored
      Set convenience variables in winTopLevelWindowProc() for WM_CREATE as
    • Jon Turney's avatar
      hw/xwin: Improve performance of -compositewm · f6791835
      Jon Turney authored
      I think that a major cost in the current implementation is doing a
      CreateDIBSection()/DestroyObject() on every refresh.  So provide our own
      CreatePixmap() instead, which does the CreateDIBSection(), once.
      Testcase: glxgears or foobillard with direct swrast
      Testcase: scrolling in a full-screen xterm
      Fix handling of RENDER Scratch Pixmaps
      (A problem easily shown with gitk or emacs)
      Note that we don't own screen pixmap to release in DestroyPixmap
      Log if unimplemented slow-path ever gets hit
    • Jon Turney's avatar
      hw/xwin: Avoid artefacts when resizing a window · 6865fe71
      Jon Turney authored
      Fill the area outside the current window size with black, rather than
      leaking framebuffer contents or leaving it undrawn.
    • Jon Turney's avatar
      hw/xwin: A simpleminded attempt at composition · ebcea16e
      Jon Turney authored
      Rather than drawing the window contents from the shadow framebuffer, use
      Composite extension redirection to cause the server to maintain a bitmap
      image of each top-level X window, and draw the window contents from
      that, so that window contents which are occluded in the framebuffer show
      correctly in the task bar and task switcher previews.
      Fix incorrect use of memset() found by gcc5
      hw/xwin/winshadgdi.c: In function ‘winBltExposedWindowRegionShadowGDI’:
      hw/xwin/winshadgdi.c:861:9: warning: ‘memset’ used with constant zero length parameter; this could be due to transposed parameters [-Wmemset-transposed-args]
      Turn on -compositewm by default
      Ignore -swcursor if -compositewm
      -swcursor is not compatible with -compositewm (because the window
      contents are drawn from an off-screen pixmap, not from the screen
      pixmap, where the software cursor will be drawn).
      Update meson.build also
      Add -compositewm option to help output
      Update CI to install prerequisites
    • Jon Turney's avatar
      hw/xwin: Push multiwindow wndproc WM_PAINT down into drawing engine · adebc376
      Jon Turney authored
      Push the multiwindow wndproc WM_PAINT handling down into the drawing
      engine.  Only the GDI engine is supported in multiwindow mode currently,
      so we only need to do this in the GDI engine.
    • Jon Turney's avatar
      hw/xwin: Align winBltExposedRegionsShadowGDI with winTopLevelWindowProc's WM_PAINT · 065f7335
      Jon Turney authored
      Make winBltExposedRegionsShadowGDI() do the same stuff that
      winTopLevelWindowProc()'s WM_PAINT handler does.
      Note that winBltExposedRegionsShadowGDI() is currently used 1) in
      windowed mode when the GDI engine is selected, and 2) in multiwindow
      mode when "Hide Root Window" is off.
  2. 12 Jun, 2019 1 commit
  3. 06 Jun, 2019 1 commit
    • Carlos Garnacho's avatar
      xwayland: Reset scheduled frames after hiding tablet cursor · dea4a746
      Carlos Garnacho authored and Olivier Fourdan's avatar Olivier Fourdan committed
      Hiding the tablet tool cursor results in it being hidden forever after.
      This is due to the stale frame callback that will neither be disposed
      or replaced. This can be reproduced in krita (X11) as the pointer
      cursor is hidden while over the canvas.
      Clearing the frame callback ensures the correct behavior in future
      xwl_tablet_tool_set_cursor() calls (i.e. a new cursor surface being
      displayed, and a new frame callback created), and is 1:1
      with xwl_seat_set_cursor() for pointers.
      Signed-off-by: Carlos Garnacho's avatarCarlos Garnacho <carlosg@gnome.org>
  4. 29 May, 2019 1 commit
  5. 28 May, 2019 4 commits
    • Olivier Fourdan's avatar
      xwayland: check `glamor_set_pixmap_texture()` status · 48f4ab75
      Olivier Fourdan authored and Adam Jackson's avatar Adam Jackson committed
      With `glamor_set_pixmap_texture()` returning its status, remove the hack
      and use the return value.
      Signed-off-by: Olivier Fourdan's avatarOlivier Fourdan <ofourdan@redhat.com>
    • Olivier Fourdan's avatar
      glamor: return status from `glamor_set_pixmap_texture()` · 9e37e41f
      Olivier Fourdan authored and Adam Jackson's avatar Adam Jackson committed
      Chnage the API for `glamor_set_pixmap_texture()` to return a status,
      so that the caller can know whether it succeeded or not.
      Signed-off-by: Olivier Fourdan's avatarOlivier Fourdan <ofourdan@redhat.com>
    • Olivier Fourdan's avatar
      xwayland: Check status in GBM pixmap creation · fc6380a1
      Olivier Fourdan authored and Adam Jackson's avatar Adam Jackson committed
      The current code in `xwl_glamor_gbm_create_pixmap_for_bo()` may fail in
      several cases that are not checked for:
       - `eglCreateImageKHR()` may have failed to create the image,
       - `glEGLImageTargetTexture2DOES()` may fail and set an error,
       - `glamor_set_pixmap_texture()` may fail for very large pixmaps
          because the corresponding FBO could not be created.
      Trying to upload content to a pixmap with no texture will crash Mesa,
      glamor and Xwayland, e.g.:
        XXX fail to create fbo.
        (EE) Backtrace:
        (EE) 0: Xwayland (OsSigHandler+0x29)
        (EE) 1: libpthread.so.0 (funlockfile+0x50)
        (EE) 2: libc.so.6 (__memmove_avx_unaligned_erms+0x215)
        (EE) 3: dri/i965_dri.so (_mesa_format_convert+0xab3)
        (EE) 4: dri/i965_dri.so (_mesa_texstore+0x205)
        (EE) 5: dri/i965_dri.so (store_texsubimage+0x28c)
        (EE) 6: dri/i965_dri.so (intel_upload_tex+0x13b)
        (EE) 7: dri/i965_dri.so (texture_sub_image+0x134)
        (EE) 8: dri/i965_dri.so (texsubimage_err+0x150)
        (EE) 9: dri/i965_dri.so (_mesa_TexSubImage2D+0x48)
        (EE) 10: Xwayland (glamor_upload_boxes+0x246)
        (EE) 11: Xwayland (glamor_copy+0x4d1)
        (EE) 12: Xwayland (miCopyRegion+0x96)
        (EE) 13: Xwayland (miDoCopy+0x43c)
        (EE) 14: Xwayland (glamor_copy_area+0x24)
        (EE) 15: Xwayland (damageCopyArea+0xba)
        (EE) 16: Xwayland (compCopyWindow+0x31c)
        (EE) 17: Xwayland (damageCopyWindow+0xd3)
        (EE) 18: Xwayland (miResizeWindow+0x7b7)
        (EE) 19: Xwayland (compResizeWindow+0x3a)
        (EE) 20: Xwayland (ConfigureWindow+0xa96)
        (EE) 21: Xwayland (ProcConfigureWindow+0x7d)
        (EE) 22: Xwayland (Dispatch+0x320)
        (EE) 23: Xwayland (dix_main+0x366)
        (EE) 24: libc.so.6 (__libc_start_main+0xf3)
        (EE) 25: Xwayland (_start+0x2e)
        Fatal server error:
        (EE) Caught signal 11 (Segmentation fault). Server aborting
      Check for the possible cases of failure above and fallback to the
      regular glamor pixmap creation when an error is detected.
      Signed-off-by: Olivier Fourdan's avatarOlivier Fourdan <ofourdan@redhat.com>
      Closes: xorg/xserver#661
    • Adam Jackson's avatar
      glamor: Fix more fallback paths with non-GXcopy rop with GLES · 766bf01b
      Adam Jackson authored and Adam Jackson's avatar Adam Jackson committed
      Desktop GL can handle arbitrary rops here, GLES can't. The switch
      statement attempts to optimize some cases that GLES can still handle if
      we precompute the right pixel value, but we were then throwing that
      pixel value away and using gc->fgPixel anyway. Fix this, and now
      xts-render passes against glamor+gles.
  6. 23 May, 2019 1 commit
  7. 21 May, 2019 1 commit
  8. 20 May, 2019 1 commit
    • Olivier Fourdan's avatar
      xwayland: Avoid a crash on pointer enter with a grab · 0a074463
      Olivier Fourdan authored and Olivier Fourdan's avatar Olivier Fourdan committed
      On pointer enter notification, Xwayland checks for an existing pointer
      warp with a `NULL` sprite.
      In turn, `xwl_pointer_warp_emulator_maybe_lock()` checks for an existing
      grab and the destination window using `XYToWindow()` which does not
      check for the actual sprite not being `NULL`.
      So, in some cases, when the pointer enters the surface and there is an
      existing X11 grab which is not an ownerEvents grab, Xwayland would crash
      trying to dereference the `NULL` sprite pointer:
        #0  __GI_raise ()
        #1  __GI_abort () at abort.c:79
        #2  OsAbort () at utils.c:1351
        #3  AbortServer () at log.c:879
        #4  FatalError () at log.c:1017
        #5  OsSigHandler () at osinit.c:156
        #6  OsSigHandler () at osinit.c:110
        #7  <signal handler called>
        #8  XYToWindow (pSprite=0x0, x=0, y=0) at events.c:2880
        #9  xwl_pointer_warp_emulator_maybe_lock () at xwayland-input.c:2673
        #10 pointer_handle_enter () at xwayland-input.c:434
      Avoid the crash by simply checking for the sprite being not `NULL` in
      Signed-off-by: Olivier Fourdan's avatarOlivier Fourdan <ofourdan@redhat.com>
      Bugzilla: https://bugzilla.redhat.com/1708119
  9. 18 May, 2019 5 commits
  10. 17 May, 2019 4 commits
  11. 14 May, 2019 1 commit
    • Adam Jackson's avatar
      glx: Fix potential crashes in glXWait{GL,X} · 2aec5c3c
      Adam Jackson authored
      glxc->drawPriv will be NULL if the context is direct, or if it is
      current but without a bound drawable. Mesa's libGL won't normally emit
      protocol for direct contexts for these calls, but a malign client could
      still crash the server.
  12. 12 May, 2019 1 commit
  13. 07 May, 2019 1 commit
    • Topi Miettinen's avatar
      os: add support for systemd notification · bb46e785
      Topi Miettinen authored
      It can take some time for Xorg to start. If Xorg runs as a systemd
      service and other services are based on it, they have no way to
      determine when Xorg is really ready to accept requests. Let's use
      sd_notify() provided by libsystemd to signal systemd for readiness.
      If Xorg has not been started as a systemd service, this won't do
      Signed-off-by: Topi Miettinen's avatarTopi Miettinen <toiwoton@gmail.com>
  14. 02 May, 2019 8 commits
  15. 01 May, 2019 4 commits