Maintain the size of the window.

Thu Mar 16 14:55:18 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/c-screen.c (struct WindowInfo): Maintain the size of the
	window.
This commit is contained in:
Søren Sandmann 2006-03-16 20:00:18 +00:00 committed by Søren Sandmann Pedersen
parent ad2c7c6ce3
commit 01cd31f7f4
2 changed files with 26 additions and 3 deletions

View File

@ -1,3 +1,8 @@
Thu Mar 16 14:55:18 2006 Søren Sandmann <sandmann@redhat.com>
* src/c-screen.c (struct WindowInfo): Maintain the size of the
window.
Wed Mar 15 16:30:09 2006 Søren Sandmann <sandmann@redhat.com>
* src/compositor.c (set_geometry): Use set_target_rect() instead

View File

@ -36,6 +36,8 @@ struct WindowInfo
Window xwindow;
CmNode *node;
gboolean updates;
WsRectangle size;
};
struct MetaScreenInfo
@ -108,8 +110,10 @@ repaint (gpointer data)
info->meta_screen->rect.width,
info->meta_screen->rect.height);
glClearColor (1.0, 0.8, 0.8, 0.0);
#if 0
glClearColor (1.0, 1.0, 0.8, 0.0);
glClear (GL_COLOR_BUFFER_BIT);
#endif
ws_window_raise (info->gl_window);
@ -373,15 +377,23 @@ meta_screen_info_set_size (MetaScreenInfo *info,
ws_display_begin_error_trap (display);
#if 0
g_print ("meta screen info set: %d %d %d %d\n",
x, y, width, height);
#endif
cm_drawable_node_set_geometry (CM_DRAWABLE_NODE (node), &rect);
shape = ws_window_get_output_shape (window);
cm_drawable_node_set_shape (node, shape);
ws_region_destroy (shape);
cm_drawable_node_update_pixmap (node);
if (rect.width != winfo->size.width ||
rect.height != winfo->size.height)
{
cm_drawable_node_update_pixmap (node);
}
winfo->size = rect;
ws_display_end_error_trap (display);
}
@ -443,6 +455,12 @@ meta_screen_info_add_window (MetaScreenInfo *info,
if (ws_window_query_input_only (WS_WINDOW (drawable)))
goto out;
if (WS_WINDOW (drawable) == info->gl_window)
{
g_print ("gl window\n");
goto out;
}
ws_drawable_query_geometry (drawable, &geometry);
node = CM_NODE (cm_drawable_node_new (drawable, &geometry));