-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
[branch: latest develop from today] arch: Windows Issue: Cairo widgets going black #437
Comments
I have encounted a similar issue. Besides UI going black, the UI may also misbehave: some parts goes black and unoperatable. And it also affects my DAW's widgets: the Win32 native UI's fonts becomes Windows 95 style. |
issues with host UI scale were solved a while ago, pugl was changing the global high-dpi process state which is not meant to happen for plugins. regarding the black screen, I suspect this might be a redraw issue, with some areas not being repainted correctly (or rather, the request for repainting not taking into account the scaled resolution of the plugin GUI) |
Sure, the question is why that happen. It is not that some redraw operation fails, it is the complete draw connection is broken when that happen. |
So I found a solution. This patch does basically what is shown in the link above. It create a cairo_image_surface on puglWinCairoEnter and provide the cairo_t* pointer for it as DrawContext. Now all cairo drawings happen outside WM_PAINT. Then, on puglWinCairoLeave we do the paint (BeginPaint -> create win32 surface, copy the image surface over, destroy anything and EndPaint.) I tested this on windows11 and it works perfect. Surly it could be optimized as we didn't relay need to create and destroy the cairo_image_surface on each WM_PAINT, this is only necessary on resize, otherwise we could reuse it. Just I can't see were resizing is handled in the win_cairo source. |
that needs to go into https://github.com/lv2/pugl which then also starts the discussion around it. |
I noticed a issue with cairo based plugs [vst2/3] under windows. They goes black after a short while, how fast, depend on how often they get redrawn, it seems . To get them then repaint again the host [fruity loops] needs to be restarted. This could happen to single SubWidgets as well as to the complete UI.
This issue didn't happen when run under linux.
The text was updated successfully, but these errors were encountered: