mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-06 04:55:44 +00:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3fac175c3a | ||
|
|
3a752def58 |
No files matched your search
@@ -19,6 +19,8 @@ library list, before anything is published.
|
|||||||
moves (it sat frozen). The X pointer is asked for only while a cursor image is drawn - every
|
moves (it sat frozen). The X pointer is asked for only while a cursor image is drawn - every
|
||||||
vblank while shown, every 50 ms while hidden for inactivity - since each ask is a blocking round
|
vblank while shown, every 50 ms while hidden for inactivity - since each ask is a blocking round
|
||||||
trip to Xwayland on the paint thread; with no image, wlserver's position is used as upstream does.
|
trip to Xwayland on the paint thread; with no image, wlserver's position is used as upstream does.
|
||||||
|
Only a move of the X pointer is followed, not where the X server starts it (the screen centre):
|
||||||
|
a window that gains focus is entered at the cursor, and Big Picture then hovered its centre tile.
|
||||||
- `0101-nested-wayland-cursor-routing.patch` - this app: `gamescope_cursor_composite=2` lets the
|
- `0101-nested-wayland-cursor-routing.patch` - this app: `gamescope_cursor_composite=2` lets the
|
||||||
nested Wayland session paint its cursor in the output using the real X pointer position; client
|
nested Wayland session paint its cursor in the output using the real X pointer position; client
|
||||||
cursor surfaces are cleared to prevent a duplicate at the host pointer, while Gamescope's original
|
cursor surfaces are cleared to prevent a duplicate at the host pointer, while Gamescope's original
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp
|
|||||||
index 10990b8..08afbc4 100644
|
index 10990b8..08afbc4 100644
|
||||||
--- a/src/steamcompmgr.cpp
|
--- a/src/steamcompmgr.cpp
|
||||||
+++ b/src/steamcompmgr.cpp
|
+++ b/src/steamcompmgr.cpp
|
||||||
@@ -2025,18 +2025,53 @@ void MouseCursor::UpdatePosition()
|
@@ -2025,18 +2025,58 @@ void MouseCursor::UpdatePosition()
|
||||||
if ( pConstraint && pConstraint->current.cursor_hint.enabled )
|
if ( pConstraint && pConstraint->current.cursor_hint.enabled )
|
||||||
{
|
{
|
||||||
m_bConstrained = true;
|
m_bConstrained = true;
|
||||||
@@ -102,7 +102,12 @@ index 10990b8..08afbc4 100644
|
|||||||
+ &win_x, &win_y,
|
+ &win_x, &win_y,
|
||||||
+ &mask );
|
+ &mask );
|
||||||
+
|
+
|
||||||
+ if ( root_x != m_x || root_y != m_y )
|
+ // The X server starts its pointer at the screen centre; only a later move is input.
|
||||||
|
+ const bool bRootMoved = m_bRootQueried && ( root_x != m_nRootX || root_y != m_nRootY );
|
||||||
|
+ m_bRootQueried = true;
|
||||||
|
+ m_nRootX = root_x;
|
||||||
|
+ m_nRootY = root_y;
|
||||||
|
+ if ( bRootMoved && ( root_x != m_x || root_y != m_y ) )
|
||||||
+ {
|
+ {
|
||||||
+ m_x = root_x;
|
+ m_x = root_x;
|
||||||
+ m_y = root_y;
|
+ m_y = root_y;
|
||||||
@@ -117,11 +122,13 @@ diff --git a/src/steamcompmgr.hpp b/src/steamcompmgr.hpp
|
|||||||
index c428784..bd62fd1 100644
|
index c428784..bd62fd1 100644
|
||||||
--- a/src/steamcompmgr.hpp
|
--- a/src/steamcompmgr.hpp
|
||||||
+++ b/src/steamcompmgr.hpp
|
+++ b/src/steamcompmgr.hpp
|
||||||
@@ -109,6 +109,7 @@ private:
|
@@ -109,6 +109,9 @@ private:
|
||||||
|
|
||||||
int m_x = 0, m_y = 0;
|
int m_x = 0, m_y = 0;
|
||||||
bool m_bConstrained = false;
|
bool m_bConstrained = false;
|
||||||
+ uint64_t m_ulLastPointerQuery = 0;
|
+ uint64_t m_ulLastPointerQuery = 0;
|
||||||
|
+ bool m_bRootQueried = false;
|
||||||
|
+ int m_nRootX = 0, m_nRootY = 0;
|
||||||
int m_hotspotX = 0, m_hotspotY = 0;
|
int m_hotspotX = 0, m_hotspotY = 0;
|
||||||
|
|
||||||
gamescope::OwningRc<CVulkanTexture> m_texture;
|
gamescope::OwningRc<CVulkanTexture> m_texture;
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp
|
||||||
|
--- a/src/steamcompmgr.cpp
|
||||||
|
+++ b/src/steamcompmgr.cpp
|
||||||
|
@@ -5818,7 +5818,9 @@
|
||||||
|
if ( pFocus->inputFocusWindow->GetFocus()->bResetToCorner )
|
||||||
|
{
|
||||||
|
wlserver_lock();
|
||||||
|
- wlserver_mousewarp( pFocus->inputFocusWindow->GetGeometry().nWidth / 2, pFocus->inputFocusWindow->GetGeometry().nHeight / 2, 0, true );
|
||||||
|
+ // Only the corner reaches the client: a page that loads during this reset keeps the centre as its hover.
|
||||||
|
+ wlserver.mouse_surface_cursorx = pFocus->inputFocusWindow->GetGeometry().nWidth / 2;
|
||||||
|
+ wlserver.mouse_surface_cursory = pFocus->inputFocusWindow->GetGeometry().nHeight / 2;
|
||||||
|
wlserver_fake_mouse_pos( pFocus->inputFocusWindow->GetGeometry().nWidth - 1, pFocus->inputFocusWindow->GetGeometry().nHeight - 1 );
|
||||||
|
wlserver_unlock();
|
||||||
|
}
|
||||||
Reference in new issue
Block a user