From 2ac1a3d7072902f1da2ecbb364beabbc27f82420 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 10 Jul 2009 09:07:56 +0000 Subject: [PATCH] Handle resizing of X11 splash window correctly, and remove the annoying log2 message of download progress --- direct/src/plugin/p3dDownload.cxx | 2 -- direct/src/plugin/p3dX11SplashWindow.cxx | 7 ++++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/direct/src/plugin/p3dDownload.cxx b/direct/src/plugin/p3dDownload.cxx index 4c76bf112a..d925d8ca06 100755 --- a/direct/src/plugin/p3dDownload.cxx +++ b/direct/src/plugin/p3dDownload.cxx @@ -129,8 +129,6 @@ void P3DDownload:: download_progress() { time_t now = time(NULL); if (now != _last_reported_time || true) { - nout << "Downloading " << get_url() << ": " - << int(get_download_progress() * 1000.0) / 10.0 << "\n"; _last_reported_time = now; } } diff --git a/direct/src/plugin/p3dX11SplashWindow.cxx b/direct/src/plugin/p3dX11SplashWindow.cxx index de1fe86055..bfa5790fec 100755 --- a/direct/src/plugin/p3dX11SplashWindow.cxx +++ b/direct/src/plugin/p3dX11SplashWindow.cxx @@ -176,7 +176,7 @@ thread_run() { setup_gc(); XEvent event; - XSelectInput(_display, _window, ExposureMask); + XSelectInput(_display, _window, ExposureMask | StructureNotifyMask); bool override = true, have_event = false; string prev_label; @@ -186,6 +186,11 @@ thread_run() { have_event = XCheckTypedWindowEvent(_display, _window, Expose, &event) || XCheckTypedWindowEvent(_display, _window, GraphicsExpose, &event); + if (XCheckTypedWindowEvent(_display, _window, ConfigureNotify, &event)) { + _width = event.xconfigure.width; + _height = event.xconfigure.height; + } + ACQUIRE_LOCK(_install_lock); double install_progress = _install_progress;