Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Counter Strike 2 (Steam game) runs in fullscreen, but Sway thinks it's not #8305

Open
o-alquimista opened this issue Aug 19, 2024 · 5 comments
Labels
bug Not working as intended

Comments

@o-alquimista
Copy link

o-alquimista commented Aug 19, 2024

Please fill out the following:

              "name": "Counter-Strike 2",
              "window": 44040218,
              "nodes": [],
              "floating_nodes": [],
              "focus": [],
              "fullscreen_mode": 0,
              "sticky": false,
              "pid": 9659,
              "app_id": null,
              "visible": false,
              "max_render_time": 0,
              "shell": "xwayland",
              "inhibit_idle": false,
              "idle_inhibitors": {
                "user": "fullscreen",
                "application": "none"
              },

See full output here: https://gist.github.com/o-alquimista/821755fd1133c90bf8b73b045234cd81#file-swaymsg-t-get_tree

This is a screenshot of the whole screen while running the game:
20240819_13h37m29s_grim

With the workspace in focus, if I press $mod+f once, fullscreen_mode turns to 1; and, as a consequence, idle inhibitors and mako's do-not-disturb mode start working.


Possibly related: missing refresh rate option 75hz (only 60hz is available on Sway). On other desktops like Xfce or GNOME, 75hz is available.


Workaround:

for_window [instance="cs2" class="SDL Application"] fullscreen enable
@o-alquimista o-alquimista added the bug Not working as intended label Aug 19, 2024
@o-alquimista o-alquimista changed the title Counter Strike 2 (Steam game) runs in fullscreen, but swaymsg says it's not Counter Strike 2 (Steam game) runs in fullscreen, but Sway thinks it's not Aug 19, 2024
@emersion
Copy link
Member

Maybe it's in a weird X11 mode where it's not fullscreen but it's positioned as if? Can you obtain an xwininfo and xprop dump of the window when it's in this state?

@o-alquimista
Copy link
Author

xwininfo:

xwininfo: Window id: 0x360001a "Counter-Strike 2"

  Absolute upper-left X:  0
  Absolute upper-left Y:  0
  Relative upper-left X:  0
  Relative upper-left Y:  0
  Width: 2560
  Height: 1080
  Depth: 24
  Visual: 0x42
  Visual Class: DirectColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x3600019 (not installed)
  Bit Gravity State: ForgetGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsViewable
  Override Redirect State: no
  Corners:  +0+0  -0+0  -0-0  +0-0
  -geometry 2560x1080+0+0

xprop:

_NET_WM_USER_TIME(CARDINAL) = 978928
_NET_WM_ICON(CARDINAL) = 
_VARIABLE_REFRESH(CARDINAL) = 1
_NET_WM_STATE(ATOM) = _NET_WM_STATE_FOCUSED
WM_STATE(WM_STATE):
		window state: Normal
		icon window: 0x0
XdndAware(ATOM) = BITMAP
_NET_WM_NAME(UTF8_STRING) = "Counter-Strike 2"
WM_NAME(UTF-8) = "Counter-Strike 2"
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS
_NET_WM_BYPASS_COMPOSITOR(CARDINAL) = 1
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_PID(CARDINAL) = 28893
WM_LOCALE_NAME(STRING) = "en_US.UTF-8"
WM_CLASS(STRING) = "cs2", "SDL Application"
WM_HINTS(WM_HINTS):
		Client accepts input or input focus: True
		window id # of group leader: 0xeb90a82d
WM_NORMAL_HINTS(WM_SIZE_HINTS):
		user specified location: 0, 0
		program specified minimum size: 2560 by 1080
		program specified maximum size: 2560 by 1080
WM_CLIENT_MACHINE(STRING) = "helium"
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x0, 0x0, 0x0, 0x0
STEAM_GAME(CARDINAL) = 730

@kennylevinsen
Copy link
Member

It doesn't look like the window is fullscreen, but rather just happens to be a big floating window. Does i3 report this any differently?

@o-alquimista
Copy link
Author

o-alquimista commented Sep 4, 2024

From i3

i3-msg -t get_tree:
https://gist.github.com/o-alquimista/821755fd1133c90bf8b73b045234cd81#file-i3-msg-t-get_tree-json

xwininfo:

xwininfo: Window id: 0x3c0001a "Counter-Strike 2"

  Absolute upper-left X:  0
  Absolute upper-left Y:  0
  Relative upper-left X:  0
  Relative upper-left Y:  0
  Width: 2560
  Height: 1080
  Depth: 24
  Visual: 0x22
  Visual Class: DirectColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x3c00019 (not installed)
  Bit Gravity State: ForgetGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsViewable
  Override Redirect State: no
  Corners:  +0+0  -0+0  -0-0  +0-0
  -geometry 2560x1080+0+0

xprop:

_NET_WM_USER_TIME(CARDINAL) = 2464627
_NET_WM_ICON(CARDINAL) = 
_VARIABLE_REFRESH(CARDINAL) = 1
_NET_WM_DESKTOP(CARDINAL) = 0
_NET_WM_STATE(ATOM) = _NET_WM_STATE_FOCUSED
WM_STATE(WM_STATE):
		window state: Normal
		icon window: 0x0
I3_FLOATING_WINDOW(CARDINAL) = 1
XdndAware(ATOM) = BITMAP
_NET_WM_NAME(UTF8_STRING) = "Counter-Strike 2"
WM_NAME(UTF-8) = "Counter-Strike 2"
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS
_NET_WM_BYPASS_COMPOSITOR(CARDINAL) = 1
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_PID(CARDINAL) = 322
WM_LOCALE_NAME(STRING) = "en_US.UTF-8"
WM_CLASS(STRING) = "cs2", "SDL Application"
WM_HINTS(WM_HINTS):
		Client accepts input or input focus: True
		window id # of group leader: 0x111ffdb2
WM_NORMAL_HINTS(WM_SIZE_HINTS):
		user specified location: 0, 0
		program specified minimum size: 2560 by 1080
		program specified maximum size: 2560 by 1080
WM_CLIENT_MACHINE(STRING) = "helium"
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x0, 0x0, 0x0, 0x0
STEAM_GAME(CARDINAL) = 730

It doesn't look any different from Sway, if I'm reading this correctly.

One difference I see is that the refresh rate options in-game includes 75hz when running i3; but that's probably not related to this fullscreen issue.

Possibly related: missing refresh rate option 75hz (only 60hz is available on Sway). On other desktops like Xfce or GNOME, 75hz is available.

@kennylevinsen
Copy link
Member

It doesn't look like i3 considers the window fullscreen either - it's just a big floating window there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not working as intended
Development

No branches or pull requests

3 participants