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

wasm: hide window content while dragging ? #84

Open
pmp-p opened this issue Jan 17, 2024 · 2 comments
Open

wasm: hide window content while dragging ? #84

pmp-p opened this issue Jan 17, 2024 · 2 comments

Comments

@pmp-p
Copy link

pmp-p commented Jan 17, 2024

is it possible to prevent showing window content while moving them ?

https://pmp-p.ddns.net/gh/mwin_asyncify/mwdemo2.html

Also when a window (X11) goes a bit out of viewport and come back, redraw is not always ok until mouseover the main widgets

https://pygame-web.github.io/showroom/fltk/index.html

maybe related #28

@pmp-p pmp-p changed the title hide window content while dragging ? wasm: hide window content while dragging ? Jan 17, 2024
@ghaerr
Copy link
Owner

ghaerr commented Jan 18, 2024

Hello @pmp-p,

is it possible to prevent showing window content while moving them ?

Yes, the ERASEMOVE setting in config (default =Y) will normally prevent Win32 window content redraws while dragging the window. It looks like the Emscripten build in demos/Makefile-emscripten is not setting this. Try adding a line CFLAGS += -DERASEMOVE=1 in line 31, that should fix it.

Also when a window (X11) goes a bit out of viewport and come back, redraw is not always ok until mouseover the main widgets

Hmmm... this one will be a bit harder to figure out. It appears that an X11 expose event is not being sent, or perhaps blocked from being received, either in the FLTK main loop, or perhaps in the NX11 (X11 -> Nano-X) conversion library. In certain cases the X11 server (which of course is not running) may be expected to keep the window contents and redisplay without an expose event.

Are you running an older (tested with Nano-X) version of FLTK? Another thought would be to turn on debug output, setting #define EVDEBUG 1 in src/nx11/NextEvent.c, as well as adding CFLAGS += -DDEBUG=1 in demos/Makefile-emscripten as describe above. This should produce more output that we can possibly use to determine what events are being received by NX11/Nano-X and help find the problem location.

Another thought would be to run a Linux native version of the demo, from which we might be able to capture more debug output.

Thank you!

@pmp-p
Copy link
Author

pmp-p commented Jan 18, 2024

FLTK in above build is git, my patches are here https://github.com/pmp-p/fltk-wasm and the upstreaming discussion here fltk/fltk#41 (comment)

thank you, i'll try the ERASEMOVE asap not sure i will have time for debugging though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants