pop-os / cosmic-comp

Compositor for the COSMIC desktop environment
GNU General Public License v3.0
418 stars 51 forks source link

[Games] Fullscreen & borderless fullscreen -> blackscreen & stuck cursor image | windowed mode works fine #460

Open onlyreportingissues opened 2 months ago

onlyreportingissues commented 2 months ago

Windowed mode is responsive, no blackscreen, cursor image moving fine also.

Fullscreen & borderless fullscreen cause some games to show a black screen or the screen is showing, but the visible cursor won't move.

Tested games:

Dekomoro commented 1 month ago

Seems likely it has to do with loss of focus?

I have multiple games that exhibit this issue, but also others that only exhibit this when I move my cursor off the fullscreen game to another monitor. Games that refocus themselves to go fullscreen on launch typically exhibit this issue it appears.

onlyreportingissues commented 1 month ago

Seems likely it has to do with loss of focus?

I have multiple games that exhibit this issue, but also others that only exhibit this when I move my cursor off the fullscreen game to another monitor. Games that refocus themselves to go fullscreen on launch typically exhibit this issue it appears.

@Dekomoro apparently Unity isn't using proper exclusive fullscreen for some reason: https://www.reddit.com/r/LastEpoch/comments/m7hpgw/has_anyone_figured_out_how_to_force_exclusive/

Added this command to a Unity game (without %command%): -window-mode exclusive -screen-fullscreen

And now the fullscreen window isn't misplaced (idk why it helps on Wayland though).

Also, the cursor seems to get stuck only when it's moving around before the game starts, as shown in this video:

Video_2024-05-18_16-54-41.webm

Opening & closing the Steam Overlay will also get the cursor stuck.

gabriele2000 commented 1 month ago

The cursor issue is bugging me a lot, but just know that it happens since cosmic-comp got updated to render the cursor using hardware-acceleration.

You can confirm it using games that only uses software-rendered cursors (like "Splinter Cell: Conviction" or "Far Cry 3, 4, 5, New Dawn, Primal))