From 2998dc2eb78f24e9224a2db364354bd045abf4b7 Mon Sep 17 00:00:00 2001 From: billh Date: Thu, 10 Jan 2002 15:13:20 +0000 Subject: [PATCH] Workaround for window manager bug using some non-gnome WMs, for magnifier. (magnifier failed to resize properly). git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@206 e2bd861d-eb25-0410-b326-f6ed22b6b98c --- util/magnifier.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/util/magnifier.c b/util/magnifier.c index 19c52cb..cb12459 100644 --- a/util/magnifier.c +++ b/util/magnifier.c @@ -127,6 +127,7 @@ int main (int argc, char** argv){ /* TODO: finish replacing socket connection IPC with bonobo service. */ Magnifier *magnifier; char * obj_id; + GdkGeometry geometry; x_cmap = NULL; @@ -239,15 +240,22 @@ int main (int argc, char** argv){ if (global_options.horizontal_split) magnifier->mag_data->mag_height = DisplayHeight (magnifier->mag_data->target_display,screen_num)/2; else magnifier->mag_data->mag_height = DisplayHeight (magnifier->mag_data->target_display, screen_num); - gtk_window_set_decorated(GTK_WINDOW (window), FALSE); + gtk_window_set_decorated (GTK_WINDOW (window), FALSE); + + /* + * this call prevents resizing, which is a bother, but required to + * work around dtwm incompatibilities. Perhaps a better workaround will + * be found, or we can make this a runtime option. + */ + gtk_widget_set_size_request (window, + magnifier->mag_data->mag_width, + magnifier->mag_data->mag_height); gtk_widget_show_all (window); gdk_window_move(window->window, gdk_screen_width() - magnifier->mag_data->mag_width, gdk_screen_height() - magnifier->mag_data->mag_height); - g_print ("setting size to %d by %d pixels\n", - magnifier->mag_data->mag_width, magnifier->mag_data->mag_height); - gdk_window_resize (window->window, magnifier->mag_data->mag_width, magnifier->mag_data->mag_height); + magnifier->mag_data->output_window = window; if (global_options.fullscreen) gdk_window_stick (window->window); gdk_window_set_functions(window->window, 0); -- 2.7.4