1
0
Fork 0

disable NameWindowPixmap stuff always for now, it seemed kind of busted

2004-08-27  Havoc Pennington  <hp@redhat.com>

	* src/compositor.c (meta_compositor_new): disable NameWindowPixmap
	stuff always for now, it seemed kind of busted
	(paint_screen): don't grab the server during repaint, adds to the
	speed, though only slightly.

	* src/frames.c (meta_frames_set_window_background): factor out all
	the set_background stuff to one function; disable setting
	background to transparent, because it breaks existing themes. We
	need to add a flag in the theme XML file to say "start me with a
	transparent background"
This commit is contained in:
Havoc Pennington 2004-08-27 22:09:13 +00:00 committed by Havoc Pennington
parent 522e9916b6
commit 744efc95a1
3 changed files with 45 additions and 31 deletions

View file

@ -1,3 +1,16 @@
2004-08-27 Havoc Pennington <hp@redhat.com>
* src/compositor.c (meta_compositor_new): disable NameWindowPixmap
stuff always for now, it seemed kind of busted
(paint_screen): don't grab the server during repaint, adds to the
speed, though only slightly.
* src/frames.c (meta_frames_set_window_background): factor out all
the set_background stuff to one function; disable setting
background to transparent, because it breaks existing themes. We
need to add a flag in the theme XML file to say "start me with a
transparent background"
2004-08-27 Elijah Newren <newren@math.utah.edu>
Prevent an assertion failure that can occur after increasing the

View file

@ -166,9 +166,11 @@ meta_compositor_new (MetaDisplay *display)
#if HAVE_NAME_WINDOW_PIXMAP
XCompositeQueryVersion (display->xdisplay,
&composite_major, &composite_minor);
#if 0
if (composite_major > 0 || composite_minor >= 2)
compositor->have_name_window_pixmap = TRUE;
#endif
#endif
}
@ -324,7 +326,7 @@ paint_screen (MetaCompositor *compositor,
meta_topic (META_DEBUG_COMPOSITOR, "Repainting screen %d root 0x%lx\n",
screen->number, screen->xroot);
meta_display_grab (screen->display);
/* meta_display_grab (screen->display); */
xdisplay = screen->display->xdisplay;
@ -478,7 +480,7 @@ paint_screen (MetaCompositor *compositor,
XRenderFreePicture (xdisplay, buffer_picture);
XFreeGC (xdisplay, gc);
meta_display_ungrab (screen->display);
/* meta_display_ungrab (screen->display); */
XSync (screen->display->xdisplay, False);
}

View file

@ -64,6 +64,9 @@ static void meta_frames_paint_to_drawable (MetaFrames *frames,
GdkDrawable *drawable,
GdkRegion *region);
static void meta_frames_set_window_background (MetaFrames *frames,
MetaUIFrame *frame);
static void meta_frames_calc_geometry (MetaFrames *frames,
MetaUIFrame *frame,
MetaFrameGeometry *fgeom);
@ -268,12 +271,9 @@ queue_recalc_func (gpointer key, gpointer value, gpointer data)
/* If a resize occurs it will cause a redraw, but the
* resize may not actually be needed so we always redraw
* in case of color change. Don't change color if this is
* an ARGB visual
* in case of color change.
*/
if (gdk_window_get_visual (frame->window)->depth != 32)
gtk_style_set_background (GTK_WIDGET (frames)->style,
frame->window, GTK_STATE_NORMAL);
meta_frames_set_window_background (frames, frame);
gdk_window_invalidate_rect (frame->window, NULL, FALSE);
meta_core_queue_frame_resize (gdk_display,
@ -316,13 +316,9 @@ queue_draw_func (gpointer key, gpointer value, gpointer data)
/* If a resize occurs it will cause a redraw, but the
* resize may not actually be needed so we always redraw
* in case of color change. Only redraw if it is not
* an ARGB visual however since we always want background
* in this case to be transparent.
* in case of color change.
*/
if (gdk_window_get_visual (frame->window)->depth != 32)
gtk_style_set_background (GTK_WIDGET (frames)->style,
frame->window, GTK_STATE_NORMAL);
meta_frames_set_window_background (frames, frame);
gdk_window_invalidate_rect (frame->window, NULL, FALSE);
}
@ -486,19 +482,8 @@ meta_frames_manage_window (MetaFrames *frames,
gdk_window_set_user_data (frame->window, frames);
/* Set the window background to the current style if not ARGB and
* transparent otherwise
*/
if (gdk_window_get_visual (frame->window)->depth != 32)
{
gtk_style_set_background (GTK_WIDGET (frames)->style,
frame->window, GTK_STATE_NORMAL);
}
else
{
col.pixel = 0;
gdk_window_set_background (window, &col);
}
/* Set the window background to the current style */
meta_frames_set_window_background (frames, frame);
/* Don't set event mask here, it's in frame.c */
@ -632,10 +617,8 @@ meta_frames_reset_bg (MetaFrames *frames,
widget = GTK_WIDGET (frames);
frame = meta_frames_lookup_window (frames, xwindow);
if (gdk_window_get_visual (frame->window)->depth != 32)
gtk_style_set_background (GTK_WIDGET (frames)->style,
frame->window, GTK_STATE_NORMAL);
meta_frames_set_window_background (frames, frame);
}
static void
@ -1915,6 +1898,22 @@ meta_frames_paint_to_drawable (MetaFrames *frames,
g_free (areas);
}
static void
meta_frames_set_window_background (MetaFrames *frames,
MetaUIFrame *frame)
{
gtk_style_set_background (GTK_WIDGET (frames)->style,
frame->window, GTK_STATE_NORMAL);
#if 0
/* This is what we want for transparent background */
{
col.pixel = 0;
gdk_window_set_background (window, &col);
}
#endif
}
static gboolean
meta_frames_enter_notify_event (GtkWidget *widget,
GdkEventCrossing *event)