Skip to content
Snippets Groups Projects
  1. Aug 07, 2024
  2. Aug 06, 2024
  3. Jul 10, 2024
  4. Jul 09, 2024
    • Olivier Fourdan's avatar
      xwayland: Check for pointer in xwl_seat_leave_ptr() · 8130fa08
      Olivier Fourdan authored
      Since commit 792758fa ("xwayland: Update lost focus on deactivation"),
      in rootful mode, if we receive an "activated" state from xdg-shell
      indicating that the surface is no longer active, we shall end up calling
      xwl_seat_leave_ptr().
      
      But xwl_seat_leave_ptr() does not actually check whether the seat has
      pointer capabilities, and if not, get_pointer_device() will return NULL.
      
      As a result, we would crash using a NULL pointer in GetMaster(). This
      typically can happen when using Xwayland rootful on headless compositors
      such as "cage" which do not advertise any capabilities for the seat.
      
      To avoid the issue, simply check whether get_pointer_device() returns a
      valid non-null device and bail out early otherwise.
      
      Fixes: 792758fa - xwayland: Update lost focus on deactivation
      Closes: #1700
      
      
      Signed-off-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
      (cherry picked from commit 72036261)
      
      Part-of: <!1592>
      8130fa08
  5. Jul 04, 2024
  6. May 15, 2024
  7. May 13, 2024
Loading