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

main window jumps up and down #1876

Closed
Fak3 opened this issue Jun 21, 2019 · 7 comments
Closed

main window jumps up and down #1876

Fak3 opened this issue Jun 21, 2019 · 7 comments
Labels

Comments

@Fak3
Copy link
Contributor

Fak3 commented Jun 21, 2019

p4a version: develop branch

I have built simple kivy app with sdl2 backend, and it looks like window is changing height each 0.5 seconds from full screen to a bit smaller. So the whole app constantly jumps up and down.

adb log: https://gist.github.com/Fak3/ce144578c74762fc39f8f26c34590bb1

@Fak3
Copy link
Contributor Author

Fak3 commented Jun 21, 2019

Suspicious thing from the log, that right before I killed the app, it reported it's height slightly lower than device height:
V/SDL (13995): Window size: 1080x1845
V/SDL (13995): Device size: 1080x1920
But before that, after app is started, it reports that both are equal

@Fak3
Copy link
Contributor Author

Fak3 commented Jun 21, 2019

The latest sdl2 from hg fixes this bug. The bad news is that it does not work with multisamples. So you have to disable it in kivy config:

from kivy.config import Config
Config.set('graphics', 'multisamples', '0')

@inclement
Copy link
Member

Any idea what has caused you to come across this issue? I don't think I've seen it mentioned before.

@Fak3
Copy link
Contributor Author

Fak3 commented Jun 23, 2019

It happens with any app if multisamples is enabled. I have reported in sdl bugtracker: https://bugzilla.libsdl.org/show_bug.cgi?id=4691

@Fak3
Copy link
Contributor Author

Fak3 commented Jun 25, 2019

Update: the kivy changeset mentioned below while probably related, does not seem to do anything wrong. Rather the bug was introduced after 2.0.9 in SDL repo, as it is reproduced in pure C SDL app.

i think it was introduced wit this commit: kivy/kivy@e437dfc
but cant;t test it, as kivy from this time fails to start with error:

06-25 18:08:35.966 I/python  ( 5717):  Traceback (most recent call last):
06-25 18:08:35.966 I/python  ( 5717):    File "/home/z/pproj/paradox_dev/main.py", line 41, in <module>
06-25 18:08:35.966 I/python  ( 5717):    File "/home/z/pproj/paradox_dev/label.py", line 4, in <module>
06-25 18:08:35.966 I/python  ( 5717):    File "/home/u1/.local/share/python-for-android/build/python-installs/paradox/kivy/uix/label.py", line 286, in <module>
06-25 18:08:35.966 I/python  ( 5717):    File "/home/u1/.local/share/python-for-android/build/python-installs/paradox/kivy/core/text/__init__.py", line 90, in <module>
06-25 18:08:35.966 I/python  ( 5717):  ImportError: cannot import name 'USE_PANGOFT2' from 'kivy.setupconfig' (/data/data/org.spbelect.paradox2/files/app/_python_bundle/site-packages/kivy/setupconfig.pyc)

@Fak3
Copy link
Contributor Author

Fak3 commented Jun 30, 2019

Oh! When app is built with --window option, it behaves normally and does not jump.

The key is to have both multisampling and SDL_WINDOW_FULLSCREEN flag.

@ghost ghost added the upstream label Jul 29, 2019
@Julian-O
Copy link
Contributor

Closing as no action required by p4a team.

If you disagree, please let us know.

@Julian-O Julian-O closed this as not planned Won't fix, can't repro, duplicate, stale Nov 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants