1. 07 Jul, 2020 1 commit
  2. 17 Mar, 2020 1 commit
  3. 28 Feb, 2020 1 commit
  4. 23 Feb, 2020 9 commits
    • Hans de Goede's avatar
      xwayland: Fix setting of _XWAYLAND_RANDR_EMU_MONITOR_RECTS prop on new windows · 148f428d
      Hans de Goede authored
      
      
      For window-manager managed windows, xwl_realize_window is only called for
      the window-manager's decoration window and not for the actual client window
      on which we should set the _XWAYLAND_RANDR_EMU_MONITOR_RECTS prop.
      
      Usualy this is not a problem since we walk all client windows to update
      the property when the resolution is changed through a randr call.
      
      But for apps which first do the randr change and only then create their
      window this does not work, and our xwl_output_set_window_randr_emu_props
      call in xwl_realize_window is a no-op as that is only called for the wm
      decoration window and not for the actual client's window.
      
      This commit fixes this by making ensure_surface_for_window() call
      xwl_output_set_window_randr_emu_props on the first and only child of
      window-manager managed windows.
      
      Note this also removes the non-functional xwl_output_set_window_randr_emu_props
      call from xwl_realize_window, which was intended to do this, but does not
      work.
      
      This fixes apps using the ogre3d library always running at the
      monitors native resolution.
      
      Acked-by: Olivier Fourdan's avatarOlivier Fourdan <ofourdan@redhat.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      148f428d
    • Hans de Goede's avatar
      xwayland: Call xwl_window_check_resolution_change_emulation() on newly created O-R windows · 4cfc2677
      Hans de Goede authored
      
      
      Some clients, which use vidmode to change the resolution when going fullscreen,
      create an override-redirect window and never trigger the screen->ResizeWindow
      callback we rely on to do the xwl_window_check_resolution_change_emulation().
      
      This causes us to not apply a viewport to them, causing the fullscreen window
      to not fill the entire monitor.
      
      This commit adds a call to xwl_window_check_resolution_change_emulation()
      at the end of ensure_surface_for_window() to fix this. Note that
      ensure_surface_for_window() exits early without creating an xwl_window
      for new windows which will not be backed by a wayland surface and which
      thus will not have an xwl_window.
      
      This fixes ClanLib-0.6.x and alleggl-4.4.x using apps not properly
      fullscreening.
      
      Acked-by: Olivier Fourdan's avatarOlivier Fourdan <ofourdan@redhat.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      4cfc2677
    • Hans de Goede's avatar
      xwayland: Also hook screen's MoveWindow method · 10df0437
      Hans de Goede authored
      
      
      Not only hook the ResizeWindow method of the screen (which really is
      MoveAndResize) but also hook the MoveWindow method for checking if we
      need to setup a viewport for resolution change emulation.
      
      Our resolution change emulation check if the windows origin matches
      the monitors origin and the windows origin can also be changed by just
      a move without being resized.
      
      Also checking on a move becomes esp. important when we move to checking
      on changes to the top-level non-window-manager client (X11)Window instead
      of on changes to the xwl_window later on in this patch series.
      
      Acked-by: Olivier Fourdan's avatarOlivier Fourdan <ofourdan@redhat.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      10df0437
    • Hans de Goede's avatar
      xwayland: Also check resolution-change-emulation when the xwl_window itself moves · 4fc10746
      Hans de Goede authored
      
      
      The recent change to use the top-level non-window-manager Window drawable
      coordinates from xwl_window_check_resolution_change_emulation() in
      combination with only calling it on a resize when the top-level window
      is moved breaks things with mutter/gnome-shell.
      
      When fullscreening a X11 window, mutter moves its window-decoration Window
      wrapping the top-level Window to the monitor's origin coordinates (e.g. 0x0)
      last. This updates the top-level's drawable coordinates, but as the
      actual MoveWindow is called on the wrapper Window and not on the toplevel
      we do not call xwl_window_check_resolution_change_emulation() and we never
      enable the viewport.
      
      This commit fixes this by also calling
      xwl_window_check_resolution_change_emulation() if the Window being moved
      is an xwl_window itself.
      
      Acked-by: Olivier Fourdan's avatarOlivier Fourdan <ofourdan@redhat.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      4fc10746
    • Roman Gilg's avatar
      xwayland: Check emulation on client toplevel resize · 6d98f840
      Roman Gilg authored
      
      
      When a reparented window is resized directly check the emulation instead of
      doing this only when the window manager parent window is resized, what might
      never happen.
      
      For that to work we need to make sure that we compare the current size of the
      client toplevel when looking for an emulated mode.
      
      Changes by Hans de Goede:
      - Remove xwl_window x, y, width and height members as those are no longer used.
      - Add check for xwl_window_from_window() returning NULL.
      
      Signed-off-by: Roman Gilg's avatarRoman Gilg <subdiff@gmail.com>
      Acked-by: Olivier Fourdan's avatarOlivier Fourdan <ofourdan@redhat.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      6d98f840
    • Roman Gilg's avatar
      xwayland: Make window_get_none_wm_owner return a Window instead of a Client · 060f1006
      Roman Gilg authored
      
      
      Make window_get_none_wm_owner return the first non-wm-window instead of the
      owner (client) of the first non-wm-window and rename it to
      window_get_client_toplevel to match its new behavior.
      
      This is a preparation patch for switching to using the drawable coordinates
      in xwl_window_should_enable_viewport()
      
      Changes by Hans de Goede:
      - Split this change out into a separate patch for easier reviewing
      - Rename window_get_none_wm_owner to window_get_client_toplevel to match
        its new behavior
      
      Signed-off-by: Roman Gilg's avatarRoman Gilg <subdiff@gmail.com>
      Acked-by: Olivier Fourdan's avatarOlivier Fourdan <ofourdan@redhat.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      060f1006
    • Roman Gilg's avatar
      xwayland: Recurse on finding the none-wm owner · a69f7fbb
      Roman Gilg authored
      
      
      An X11 window manager might add a chain of parent windows when reparenting to a
      decoration window.
      
      That is for example the case for KWin, which reparents client windows to one
      decoration and another wrapper parent window.
      
      Account for that by a recursion into the tree. For now assume as before that
      all X11 window managers reparent with one child only for these parent windows.
      
      Changes by Hans de Goede:
      - Move the xwl_window_is_toplevel() from a later patch in this series here
        as it really belongs together with these changes
      - Drop no longer necessary xwl_window argument from window_get_none_wm_owner
        parameters
      
      Signed-off-by: Roman Gilg's avatarRoman Gilg <subdiff@gmail.com>
      Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
      Acked-by: Olivier Fourdan's avatarOlivier Fourdan <ofourdan@redhat.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      a69f7fbb
    • Roman Gilg's avatar
      xwayland: Reuse viewport instead of recreating · 948e0287
      Roman Gilg authored
      
      
      When a viewport is already created we can reuse this object instead of
      destroying it and getting a new one for updating the source rectangle and
      destination size.
      
      Signed-off-by: Roman Gilg's avatarRoman Gilg <subdiff@gmail.com>
      Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
      Acked-by: Olivier Fourdan's avatarOlivier Fourdan <ofourdan@redhat.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      948e0287
    • Hans de Goede's avatar
      xwayland: Cache client-id for the window-manager client · ded89300
      Hans de Goede authored
      
      
      Instead of iterating over all clients which are listening for events on the
      root window and checking if the client we are dealing with is the one
      listening for SubstructureRedirectMask | ResizeRedirectMask events and thus
      is the window-manager, cache the client-id of the window-manager in
      xwl_screen and use that when checking if a client is the window-manager.
      
      Note that we cache and compare the client-id rather then the ClienPtr,
      this saves reading the ClientPtr from the global clients array when doing
      the comparison.
      
      Suggested-by: Olivier Fourdan's avatarOlivier Fourdan <ofourdan@redhat.com>
      Acked-by: Olivier Fourdan's avatarOlivier Fourdan <ofourdan@redhat.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      ded89300
  5. 11 Feb, 2020 1 commit
  6. 20 Dec, 2019 5 commits