aeb-dev / steamworks

BSD 3-Clause "New" or "Revised" License
22 stars 1 forks source link

A problem about the SteamClient.instance.steamFriends.activateGameOverlayToWebPage #11

Closed gzlock closed 9 months ago

gzlock commented 1 year ago

My code

/// widget.file.id is steam ugc item id
/// 
ListTile(
  title: Text(WindowsUI.openInSteam.tr),
  trailing: Icon(Icons.chevron_right_rounded),
  onTap: () {
    SteamClient.instance.steamFriends.activateGameOverlayToWebPage(
      'https://steamcommunity.com/sharedfiles/filedetails/?id=${widget.file.id}'
          .toNativeUtf8(),
      EActivateGameOverlayToWebPageMode.default_,
    );
  },
),

In the development environment, it successfully wake up the Steam native window and open the web page in the Steam window. But in the production environment and the program startup from steam, when pressed this ListTile, it just display a webview overlay over the flutter window, the problem is it frozen the flutter program window, can not close, can not move the window, can not interactive anything in this window, it dead.

I record a screen video.

https://github.com/aeb-dev/steamworks/assets/2311740/aedd98db-c805-44d0-a2d4-da5f6463843d

gzlock commented 1 year ago

image My first question had answer, but need the user to manually turn it off.

aeb-dev commented 1 year ago

https://partner.steamgames.com/doc/api/ISteamFriends#ActivateGameOverlayToWebPage As the documentation says it uses overlay to open the webpage. I don't know how to change that behavior.

For freezing, I will try to check but I am not sure how releasing the app can affect it

aeb-dev commented 1 year ago

There are a lot of recent freeze/crash reports on steam repo https://github.com/ValveSoftware/steam-for-linux/issues?q=is%3Aissue+overlay+freeze. It might be related to that but I could not find something solid yet

gzlock commented 1 year ago

https://partner.steamgames.com/doc/api/ISteamFriends#ActivateGameOverlayToWebPage As the documentation says it uses overlay to open the webpage. I don't know how to change that behavior.

For freezing, I will try to check but I am not sure how releasing the app can affect it

Did you notice the frame rate value in the upper left corner? Would it have anything to do with the fact that the flutter keeps displaying at 1fps (or doesn't refresh the program interface anymore) when Steam overlay is displayed?

This guess may not be accurate, as it is unlikely to freeze the movement, maximization and closing of windows

gzlock commented 1 year ago

I used the url_launcher package + https://developer.valvesoftware.com/wiki/Steam_browser_protocol instead of the overlay funcions. And then really hopefully that can be fixed this issue.

aeb-dev commented 1 year ago

I feel like when overlay is launched steam runs it on the main thread as blocking so that is why whole application freezes.

gzlock commented 9 months ago

Steam seems to have fixed this issue. I'm keeping to use the v1.57 sdk, and the overlay worked now.

https://github.com/aeb-dev/steamworks/assets/2311740/842998b0-bab6-4dfa-b10a-11d294f293b4

aeb-dev commented 9 months ago

That is nice to hear. I am going to close the issue. Feel free to re-open.