mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
JBR-7811 Wayland: IDE dialogs and popups flash black before opening
This commit is contained in:
@@ -1029,13 +1029,20 @@ WLSBM_SurfaceAssign(WLSurfaceBufferManager * manager, struct wl_surface* wl_surf
|
||||
// cancel any associated pending callbacks:
|
||||
CancelFrameCallback(manager);
|
||||
if (wl_surface != NULL) {
|
||||
// Must send whatever there is in the buffer right now, at a minimum
|
||||
// in order to associate the surface with a buffer and make it appear
|
||||
// If there's already something drawn in the buffer, let's send it right now,
|
||||
// at a minimum in order to associate the surface with a buffer and make it appear
|
||||
// on the screen. Normally this would happen in WLSBM_SurfaceCommit(),
|
||||
// but the Java side may have already drawn and committed something and
|
||||
// but the Java side may have already drawn and committed everything it wanted and
|
||||
// will not commit anything new for a while, in which case the surface
|
||||
// may never get associated with a buffer and the window will never appear.
|
||||
TrySendShowBufferToWayland(manager, true);
|
||||
if (manager->bufferForDraw.damageList != NULL) {
|
||||
WLBufferTrace(manager, "WLSBM_SurfaceAssign: surface has damage, will try to send it now");
|
||||
TrySendShowBufferToWayland(manager, true);
|
||||
} else {
|
||||
WLBufferTrace(manager, "WLSBM_SurfaceAssign: no damage, will wait for WLSBM_SurfaceCommit()");
|
||||
// The next commit must associate the surface with a buffer, so set the flag:
|
||||
manager->sendBufferASAP = true;
|
||||
}
|
||||
} else {
|
||||
ResetBuffers(manager);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user