flathub / com.spotify.Client

https://flathub.org/apps/details/com.spotify.Client
68 stars 34 forks source link

get-scale-factor.py script broken #215

Closed vincentbernat closed 1 year ago

vincentbernat commented 1 year ago

Hey!

After latest update, get-scale-factor.py does not work anymore:

bash-5.1$ DISPLAY=:0 python3
Python 3.10.6 (main, Nov 10 2011, 15:00:00) [GCC 12.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import xsettings
>>> settings = xsettings.get_xsettings()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/app/bin/xsettings.py", line 191, in get_xsettings
    raw_xsettings = get_raw_xsettings(display)
  File "/app/bin/xsettings.py", line 128, in get_raw_xsettings
    cookie = xcb.xcb_get_property(connection, 0, window, settings_atom, 0, 0, 0x2000)
RuntimeError: ffi_prep_cif_var failed
SuperNinja-4965 commented 1 year ago

strange, i am not seeing this issue on either of my devices:

[MyDevice ~]$ flatpak install spotify
Looking for matches…
Remotes found with refs similar to ‘spotify’:

   1) ‘flathub’ (system)
   2) ‘flathub’ (user)

Which do you want to use (0 to abort)? [0-2]: 1
Found ref ‘app/com.spotify.Client/x86_64/stable’ in remote ‘flathub’ (system).
Use this ref? [Y/n]: y
Skipping: com.spotify.Client/x86_64/stable is already installed
[MyDevice ~]$ flatpak run --command=bash com.spotify.Client 
[MyDevice ~]$ ls
Music  Pictures
[MyDevice ~]$ cd /
[MyDevice /]$ ls
app  bin  dev  etc  home  lib  lib64  proc  run  sbin  sys  tmp  usr  var
[MyDevice /]$ cd app/
[MyDevice /app]$ ls
bin  extra  lib  manifest.json  share
[MyDevice /app]$ cd bin/
[MyDevice /app/bin]$ ls
apply_extra  get-scale-factor.py  mksquashfs  set-dark-theme-variant.py  spotify  sqfscat  sqfstar  unsquashfs  xprop  xsettings.py
[MyDevice /app/bin]$ python get-scale-factor.py 
1
[MyDevice /app/bin]$
SuperNinja-4965 commented 1 year ago

no nvm i see the issue

SuperNinja-4965 commented 1 year ago

This appears it can be fixed with an update to the xsettings script. i will create a pr now.

SuperNinja-4965 commented 1 year ago

Could you check to see if that pr resolves this issue?

vincentbernat commented 1 year ago

Thanks, it works for me!