diff options
author | Bill Haneman <billh@src.gnome.org> | 2004-04-07 13:05:17 +0000 |
---|---|---|
committer | Bill Haneman <billh@src.gnome.org> | 2004-04-07 13:05:17 +0000 |
commit | 1e27cd25859ba8899e39511b574734b205e87bb5 (patch) | |
tree | 4dd83195476ac92d02b107899d31a7d502f50453 | |
parent | 269707b770faad2a98e493ba9571a306ace1c94e (diff) |
Improved on-the-fly changing of target display.
Fixed a problem with getting the BORDERCOLOR attribute.
Added controls for target/source display to test/control-client.
-rw-r--r-- | ChangeLog | 19 | ||||
-rw-r--r-- | magnifier/magnifier.c | 6 | ||||
-rw-r--r-- | magnifier/zoom-region.c | 6 | ||||
-rw-r--r-- | test/control-client.c | 8 |
4 files changed, 37 insertions, 2 deletions
@@ -1,3 +1,22 @@ +2004-04-07 Bill Haneman <billh@gnome.org> + + * magnifier/magnifier.c: + (magnifier_realize): Reversed incorrect sense of a #define + regarding WM hints when gnome-mag is using OVERRIDE_REDIRECT. + (magnifier_init_window): Set window type to GTK_WINDOW_TOPLEVEL + if compiled with MAG_WINDOW_OVERRIDE_REDIRECT undefined. + + * magnifier/zoom-region.c: + (zoom_region_get_property): + Fixed broken fall-through in BORDERCOLOR_PROP. + (zoom_region_init): + NULL the default_gc when a new zoom region is created, to + avoid inappropriate reuse. + + * test/control-client.c: + Added tests for setting target and source displays. + "s" changes source display, "t" changes target. + 2004-03-22 Bill Haneman <billh@gnome.org> * configure.in: diff --git a/magnifier/magnifier.c b/magnifier/magnifier.c index a97cd99..d8aac4c 100644 --- a/magnifier/magnifier.c +++ b/magnifier/magnifier.c @@ -134,7 +134,7 @@ magnifier_realize (GtkWidget *widget) static gboolean initialized = FALSE; -#ifdef MAG_WINDOW_OVERRIDE_REDIRECT +#ifndef MAG_WINDOW_OVERRIDE_REDIRECT if (!initialized) { wm_window_protocols[0] = gdk_x11_get_xatom_by_name_for_display (target_display, "WM_DELETE_WINDOW"); @@ -937,7 +937,11 @@ magnifier_init_window (Magnifier *magnifier) g_object_connect (gtk_widget_new (gtk_window_get_type (), "user_data", NULL, "can_focus", FALSE, +#ifdef MAG_WINDOW_OVERRIDE_REDIRECT "type", GTK_WINDOW_POPUP, +#else + "type", GTK_WINDOW_TOPLEVEL, +#endif "title", "magnifier", "allow_grow", TRUE, "allow_shrink", TRUE, diff --git a/magnifier/zoom-region.c b/magnifier/zoom-region.c index 0b201c1..d72932a 100644 --- a/magnifier/zoom-region.c +++ b/magnifier/zoom-region.c @@ -2170,6 +2170,7 @@ zoom_region_get_property (BonoboPropertyBag *bag, case ZOOM_REGION_BORDERCOLOR_PROP: BONOBO_ARG_SET_LONG (arg, zoom_region->border_color); + break; case ZOOM_REGION_VIEWPORT_PROP: BONOBO_ARG_SET_GENERAL (arg, zoom_region->viewport, TC_GNOME_Magnifier_RectBounds, @@ -2902,6 +2903,11 @@ zoom_region_init (ZoomRegion *zoom_region) zoom_region_update_pointer_timeout, zoom_region, NULL); + /* to avoid reuse of an inappropriate default_gc, we NULL it when + * creating a new zoom region. Better fix is in cvs HEAD, + * but this one is smaller and more appropriate for 'stable' branch + */ + default_gc = NULL; } ZoomRegion * diff --git a/test/control-client.c b/test/control-client.c index 79bdd09..71f4210 100644 --- a/test/control-client.c +++ b/test/control-client.c @@ -152,7 +152,7 @@ int main(int argc, char ** argv){ (float) atof (argv[1]+1), &ev); break; - case 's': + case 'b': if (zoom_region == CORBA_OBJECT_NIL) return -1; printf ("resizing region 0 to 100x100 at (200, 0)\n"); viewport = GNOME_Magnifier_RectBounds__alloc (); @@ -171,6 +171,12 @@ int main(int argc, char ** argv){ case 'c': fprintf (stderr, "creating 2.5x by 5x region at 100,100; 300x200\n"); magnifier_create_region (2.5, 5.0, 100, 100, 400, 300); + case 's': + GNOME_Magnifier_Magnifier__set_SourceDisplay (magnifier, argv[1]+1, &ev); + break; + case 't': + GNOME_Magnifier_Magnifier__set_TargetDisplay (magnifier, argv[1]+1, &ev); + break; } return 0; |