Don't hardcode screen size.

Fri Mar 31 12:13:21 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/c-screen.c (meta_screen_info_redirect): Don't hardcode
	screen size.
This commit is contained in:
Søren Sandmann 2006-03-31 17:13:48 +00:00 committed by Søren Sandmann Pedersen
parent eb102ab37f
commit f7a202eb81
2 changed files with 22 additions and 10 deletions

View File

@ -1,3 +1,8 @@
Fri Mar 31 12:13:21 2006 Søren Sandmann <sandmann@redhat.com>
* src/c-screen.c (meta_screen_info_redirect): Don't hardcode
screen size.
Thu Mar 30 17:01:12 2006 Søren Sandmann <sandmann@redhat.com> Thu Mar 30 17:01:12 2006 Søren Sandmann <sandmann@redhat.com>
* src/compositor.c (struct MetaCompositor): Fix the memory * src/compositor.c (struct MetaCompositor): Fix the memory

View File

@ -276,6 +276,8 @@ meta_screen_info_redirect (MetaScreenInfo *info)
WsRectangle source; WsRectangle source;
WsRectangle target; WsRectangle target;
WsServerRegion *region; WsServerRegion *region;
int screen_w;
int screen_h;
#if 0 #if 0
g_print ("redirecting %lx\n", WS_RESOURCE_XID (root)); g_print ("redirecting %lx\n", WS_RESOURCE_XID (root));
@ -303,18 +305,23 @@ meta_screen_info_redirect (MetaScreenInfo *info)
cm_stacker_add_child (info->stacker, cm_square_new (0.3, 0.3, 0.8, 1.0)); cm_stacker_add_child (info->stacker, cm_square_new (0.3, 0.3, 0.8, 1.0));
source.x = 600; screen_w = ws_screen_get_width (info->screen);
source.y = 100; screen_h = ws_screen_get_height (info->screen);
source.width = 400;
source.height = 75;
target.x = 1300; g_print ("width: %d height %d\n", screen_w, screen_h);
target.y = 900;
target.width = 300; source.x = (screen_w - (screen_w / 4)) / 2;
target.height = 300; source.y = screen_h / 16;
source.width = screen_w / 4;
source.height = screen_h / 16;
target.x = 0;
target.y = screen_h - screen_h / 4;
target.width = screen_w;
target.height = screen_h / 4;
info->magnifier = cm_magnifier_new (info->stacker, &source, &target); info->magnifier = cm_magnifier_new (info->stacker, &source, &target);
cm_magnifier_set_active (info->magnifier, FALSE); cm_magnifier_set_active (info->magnifier, TRUE);
info->repaint_id = info->repaint_id =
g_signal_connect (info->magnifier, "need_repaint", g_signal_connect (info->magnifier, "need_repaint",