From 388ddda9d74ab6366e9423ed8cb49cb68ed7d3d5 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 2 Jul 2021 14:04:57 +0200 Subject: [PATCH] x11: Fix black screen when switching fullscreen without WM Reconfiguring the window to origin 0, 0 is unnecessary and if the win origin is already 0, 0 this results in Panda waiting for a ConfigureNotify that never comes. --- panda/src/x11display/x11GraphicsWindow.cxx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/panda/src/x11display/x11GraphicsWindow.cxx b/panda/src/x11display/x11GraphicsWindow.cxx index f63a5b263a..25d18a96cf 100644 --- a/panda/src/x11display/x11GraphicsWindow.cxx +++ b/panda/src/x11display/x11GraphicsWindow.cxx @@ -768,12 +768,15 @@ set_properties_now(WindowProperties &properties) { int value_mask = 0; if (_properties.get_fullscreen()) { - changes.x = 0; - changes.y = 0; - value_mask |= CWX | CWY; - properties.clear_origin(); - - } else if (properties.has_origin()) { + if (_properties.get_x_origin() != 0 || + _properties.get_y_origin() != 0) { + changes.x = 0; + changes.y = 0; + value_mask |= CWX | CWY; + properties.clear_origin(); + } + } + else if (properties.has_origin()) { changes.x = properties.get_x_origin(); changes.y = properties.get_y_origin(); if (changes.x != -1) value_mask |= CWX;