mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-11 13:10:07 +00:00
Remove old debug g_warning(). (gdk_fb_draw_drawable): The src argument can
2000-12-05 Alexander Larsson <alla@lysator.liu.se> * gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_draw_drawable_3): Remove old debug g_warning(). (gdk_fb_draw_drawable): The src argument can be either a wrapper or an implementation, just pass the implementation to draw_drawable_2. * gdk/linux-fb/gdkprivate-fb.h: Added GDK_IS_DRAWABLE_IMPL_FBDATA() * gdk/linux-fb/gdkwindow-fb.c (_gdk_windowing_window_destroy): clear and invalidate area when window is destroyed. (send_map_events): Remove old commented out code.
This commit is contained in:
parent
b7118c8094
commit
f1046d9a66
14
ChangeLog
14
ChangeLog
@ -1,3 +1,17 @@
|
||||
2000-12-05 Alexander Larsson <alla@lysator.liu.se>
|
||||
|
||||
* gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_draw_drawable_3):
|
||||
Remove old debug g_warning().
|
||||
(gdk_fb_draw_drawable): The src argument can be either a wrapper
|
||||
or an implementation, just pass the implementation to draw_drawable_2.
|
||||
|
||||
* gdk/linux-fb/gdkprivate-fb.h:
|
||||
Added GDK_IS_DRAWABLE_IMPL_FBDATA()
|
||||
|
||||
* gdk/linux-fb/gdkwindow-fb.c (_gdk_windowing_window_destroy):
|
||||
clear and invalidate area when window is destroyed.
|
||||
(send_map_events): Remove old commented out code.
|
||||
|
||||
2000-12-05 Alexander Larsson <alexl@redhat.com>
|
||||
|
||||
* gdk/linux-fb/gdkpango-fb.c:
|
||||
|
@ -1,3 +1,17 @@
|
||||
2000-12-05 Alexander Larsson <alla@lysator.liu.se>
|
||||
|
||||
* gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_draw_drawable_3):
|
||||
Remove old debug g_warning().
|
||||
(gdk_fb_draw_drawable): The src argument can be either a wrapper
|
||||
or an implementation, just pass the implementation to draw_drawable_2.
|
||||
|
||||
* gdk/linux-fb/gdkprivate-fb.h:
|
||||
Added GDK_IS_DRAWABLE_IMPL_FBDATA()
|
||||
|
||||
* gdk/linux-fb/gdkwindow-fb.c (_gdk_windowing_window_destroy):
|
||||
clear and invalidate area when window is destroyed.
|
||||
(send_map_events): Remove old commented out code.
|
||||
|
||||
2000-12-05 Alexander Larsson <alexl@redhat.com>
|
||||
|
||||
* gdk/linux-fb/gdkpango-fb.c:
|
||||
|
@ -1,3 +1,17 @@
|
||||
2000-12-05 Alexander Larsson <alla@lysator.liu.se>
|
||||
|
||||
* gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_draw_drawable_3):
|
||||
Remove old debug g_warning().
|
||||
(gdk_fb_draw_drawable): The src argument can be either a wrapper
|
||||
or an implementation, just pass the implementation to draw_drawable_2.
|
||||
|
||||
* gdk/linux-fb/gdkprivate-fb.h:
|
||||
Added GDK_IS_DRAWABLE_IMPL_FBDATA()
|
||||
|
||||
* gdk/linux-fb/gdkwindow-fb.c (_gdk_windowing_window_destroy):
|
||||
clear and invalidate area when window is destroyed.
|
||||
(send_map_events): Remove old commented out code.
|
||||
|
||||
2000-12-05 Alexander Larsson <alexl@redhat.com>
|
||||
|
||||
* gdk/linux-fb/gdkpango-fb.c:
|
||||
|
@ -1,3 +1,17 @@
|
||||
2000-12-05 Alexander Larsson <alla@lysator.liu.se>
|
||||
|
||||
* gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_draw_drawable_3):
|
||||
Remove old debug g_warning().
|
||||
(gdk_fb_draw_drawable): The src argument can be either a wrapper
|
||||
or an implementation, just pass the implementation to draw_drawable_2.
|
||||
|
||||
* gdk/linux-fb/gdkprivate-fb.h:
|
||||
Added GDK_IS_DRAWABLE_IMPL_FBDATA()
|
||||
|
||||
* gdk/linux-fb/gdkwindow-fb.c (_gdk_windowing_window_destroy):
|
||||
clear and invalidate area when window is destroyed.
|
||||
(send_map_events): Remove old commented out code.
|
||||
|
||||
2000-12-05 Alexander Larsson <alexl@redhat.com>
|
||||
|
||||
* gdk/linux-fb/gdkpango-fb.c:
|
||||
|
@ -1,3 +1,17 @@
|
||||
2000-12-05 Alexander Larsson <alla@lysator.liu.se>
|
||||
|
||||
* gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_draw_drawable_3):
|
||||
Remove old debug g_warning().
|
||||
(gdk_fb_draw_drawable): The src argument can be either a wrapper
|
||||
or an implementation, just pass the implementation to draw_drawable_2.
|
||||
|
||||
* gdk/linux-fb/gdkprivate-fb.h:
|
||||
Added GDK_IS_DRAWABLE_IMPL_FBDATA()
|
||||
|
||||
* gdk/linux-fb/gdkwindow-fb.c (_gdk_windowing_window_destroy):
|
||||
clear and invalidate area when window is destroyed.
|
||||
(send_map_events): Remove old commented out code.
|
||||
|
||||
2000-12-05 Alexander Larsson <alexl@redhat.com>
|
||||
|
||||
* gdk/linux-fb/gdkpango-fb.c:
|
||||
|
@ -1,3 +1,17 @@
|
||||
2000-12-05 Alexander Larsson <alla@lysator.liu.se>
|
||||
|
||||
* gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_draw_drawable_3):
|
||||
Remove old debug g_warning().
|
||||
(gdk_fb_draw_drawable): The src argument can be either a wrapper
|
||||
or an implementation, just pass the implementation to draw_drawable_2.
|
||||
|
||||
* gdk/linux-fb/gdkprivate-fb.h:
|
||||
Added GDK_IS_DRAWABLE_IMPL_FBDATA()
|
||||
|
||||
* gdk/linux-fb/gdkwindow-fb.c (_gdk_windowing_window_destroy):
|
||||
clear and invalidate area when window is destroyed.
|
||||
(send_map_events): Remove old commented out code.
|
||||
|
||||
2000-12-05 Alexander Larsson <alexl@redhat.com>
|
||||
|
||||
* gdk/linux-fb/gdkpango-fb.c:
|
||||
|
@ -1,3 +1,17 @@
|
||||
2000-12-05 Alexander Larsson <alla@lysator.liu.se>
|
||||
|
||||
* gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_draw_drawable_3):
|
||||
Remove old debug g_warning().
|
||||
(gdk_fb_draw_drawable): The src argument can be either a wrapper
|
||||
or an implementation, just pass the implementation to draw_drawable_2.
|
||||
|
||||
* gdk/linux-fb/gdkprivate-fb.h:
|
||||
Added GDK_IS_DRAWABLE_IMPL_FBDATA()
|
||||
|
||||
* gdk/linux-fb/gdkwindow-fb.c (_gdk_windowing_window_destroy):
|
||||
clear and invalidate area when window is destroyed.
|
||||
(send_map_events): Remove old commented out code.
|
||||
|
||||
2000-12-05 Alexander Larsson <alexl@redhat.com>
|
||||
|
||||
* gdk/linux-fb/gdkpango-fb.c:
|
||||
|
@ -558,10 +558,6 @@ gdk_fb_draw_drawable_3 (GdkDrawable *drawable,
|
||||
case 78:
|
||||
draw_func = gc_private->draw_drawable[GDK_FB_SRC_BPP_8_AA_GRAYVAL];
|
||||
break;
|
||||
case 0:
|
||||
g_warning ("gdk_fb_draw_drawable_3() - source drawable with zero depth, ignoring\n");
|
||||
return;
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
@ -623,7 +619,15 @@ gdk_fb_draw_drawable (GdkDrawable *drawable,
|
||||
gint width,
|
||||
gint height)
|
||||
{
|
||||
gdk_fb_draw_drawable_2 (drawable, gc, GDK_DRAWABLE_IMPL (src), xsrc, ysrc, xdest, ydest, width, height, TRUE, TRUE);
|
||||
GdkPixmap *src_impl;
|
||||
|
||||
if (GDK_IS_DRAWABLE_IMPL_FBDATA (src))
|
||||
src_impl = src;
|
||||
else
|
||||
src_impl = GDK_DRAWABLE_IMPL (src);
|
||||
|
||||
|
||||
gdk_fb_draw_drawable_2 (drawable, gc, src_impl , xsrc, ysrc, xdest, ydest, width, height, TRUE, TRUE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -40,15 +40,18 @@
|
||||
#include <stdio.h>
|
||||
#include <freetype/freetype.h>
|
||||
|
||||
|
||||
#define GDK_TYPE_DRAWABLE_IMPL_FBDATA (gdk_drawable_impl_fb_get_type ())
|
||||
#define GDK_DRAWABLE_IMPL_FBDATA(win) ((GdkDrawableFBData *)((GdkWindowObject *)(win))->impl)
|
||||
#define GDK_DRAWABLE_IMPL(win) ((GdkDrawable *)((GdkWindowObject *)(win))->impl)
|
||||
#define GDK_WINDOW_IMPL_FBDATA(win) ((GdkWindowFBData *)((GdkWindowObject *)(win))->impl)
|
||||
#define GDK_PIXMAP_IMPL_FBDATA(win) ((GdkPixmapFBData *)((GdkWindowObject *)(win))->impl)
|
||||
#define GDK_DRAWABLE_FBDATA(win) ((GdkDrawableFBData *)(win))
|
||||
#define GDK_PIXMAP_FBDATA(win) ((GdkPixmapFBData *)(win))
|
||||
#define GDK_WINDOW_FBDATA(win) ((GdkWindowFBData *)(win))
|
||||
#define GDK_FONT_FB(f) ((GdkFontPrivateFB *)(f))
|
||||
#define GDK_CURSOR_FB(c) ((GdkCursorPrivateFB *)(c))
|
||||
#define GDK_IS_DRAWABLE_IMPL_FBDATA(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_DRAWABLE_IMPL_FBDATA))
|
||||
#define GDK_DRAWABLE_IMPL(win) ((GdkDrawable *)((GdkWindowObject *)(win))->impl)
|
||||
#define GDK_WINDOW_IMPL_FBDATA(win) ((GdkWindowFBData *)((GdkWindowObject *)(win))->impl)
|
||||
#define GDK_PIXMAP_IMPL_FBDATA(win) ((GdkPixmapFBData *)((GdkWindowObject *)(win))->impl)
|
||||
#define GDK_DRAWABLE_FBDATA(win) ((GdkDrawableFBData *)(win))
|
||||
#define GDK_PIXMAP_FBDATA(win) ((GdkPixmapFBData *)(win))
|
||||
#define GDK_WINDOW_FBDATA(win) ((GdkWindowFBData *)(win))
|
||||
#define GDK_FONT_FB(f) ((GdkFontPrivateFB *)(f))
|
||||
#define GDK_CURSOR_FB(c) ((GdkCursorPrivateFB *)(c))
|
||||
|
||||
#define GDK_CHECK_IMPL(drawable) \
|
||||
g_assert(G_OBJECT_TYPE(drawable) == _gdk_window_impl_get_type() || G_OBJECT_TYPE(drawable) == _gdk_pixmap_impl_get_type())
|
||||
|
@ -253,127 +253,27 @@ gdk_window_new (GdkWindow *parent,
|
||||
return window;
|
||||
}
|
||||
|
||||
/* Call this function when you want a window and all its children to
|
||||
* disappear. When xdestroy is true, a request to destroy the XWindow
|
||||
* is sent out. When it is false, it is assumed that the XWindow has
|
||||
* been or will be destroyed by destroying some ancestor of this
|
||||
* window.
|
||||
*/
|
||||
/* This function is called when the XWindow is really gone. */
|
||||
void
|
||||
_gdk_windowing_window_destroy (GdkWindow *window,
|
||||
gboolean recursing,
|
||||
gboolean foreign_destroy)
|
||||
{
|
||||
GdkWindowObject *private;
|
||||
GdkRectangle r;
|
||||
|
||||
private = (GdkWindowObject*) window;
|
||||
|
||||
_gdk_selection_window_destroyed (window);
|
||||
|
||||
#if 0
|
||||
GdkWindowObject *private;
|
||||
GdkWindowObject *temp_private;
|
||||
GdkWindow *temp_window;
|
||||
GList *children;
|
||||
GList *tmp;
|
||||
gboolean our_destroy = !foreign_destroy;
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
|
||||
private = (GdkWindowObject*) window;
|
||||
|
||||
switch (private->window_type)
|
||||
{
|
||||
case GDK_WINDOW_TOPLEVEL:
|
||||
case GDK_WINDOW_CHILD:
|
||||
case GDK_WINDOW_DIALOG:
|
||||
case GDK_WINDOW_TEMP:
|
||||
case GDK_WINDOW_FOREIGN:
|
||||
if (!private->destroyed)
|
||||
{
|
||||
if (private->parent)
|
||||
{
|
||||
GdkWindowObject *parent_private = (GdkWindowObject *)private->parent;
|
||||
if (parent_private->children)
|
||||
parent_private->children = g_list_remove (parent_private->children, window);
|
||||
}
|
||||
|
||||
if (private->bg_pixmap && private->bg_pixmap != GDK_PARENT_RELATIVE_BG && private->bg_pixmap != GDK_NO_BG)
|
||||
{
|
||||
gdk_pixmap_unref (private->bg_pixmap);
|
||||
private->bg_pixmap = NULL;
|
||||
}
|
||||
|
||||
if (GDK_DRAWABLE_TYPE (window) != GDK_WINDOW_FOREIGN)
|
||||
{
|
||||
children = tmp = private->children;
|
||||
private->children = NULL;
|
||||
|
||||
while (tmp)
|
||||
{
|
||||
temp_window = tmp->data;
|
||||
tmp = tmp->next;
|
||||
|
||||
temp_private = (GdkWindowObject*) temp_window;
|
||||
if (temp_private)
|
||||
_gdk_windowing_window_destroy (temp_window, !FALSE,
|
||||
!our_destroy);
|
||||
}
|
||||
|
||||
g_list_free (children);
|
||||
}
|
||||
|
||||
if (private->extension_events != 0)
|
||||
gdk_input_window_destroy (window);
|
||||
|
||||
if (private->filters)
|
||||
{
|
||||
tmp = private->filters;
|
||||
|
||||
while (tmp)
|
||||
{
|
||||
g_free (tmp->data);
|
||||
tmp = tmp->next;
|
||||
}
|
||||
|
||||
g_list_free (private->filters);
|
||||
private->filters = NULL;
|
||||
}
|
||||
|
||||
if (private->window_type == GDK_WINDOW_FOREIGN)
|
||||
{
|
||||
if (our_destroy && (private->parent != NULL))
|
||||
{
|
||||
/* It's somebody elses window, but in our heirarchy,
|
||||
* so reparent it to the root window, and then send
|
||||
* it a delete event, as if we were a WM
|
||||
*/
|
||||
gdk_error_trap_push ();
|
||||
gdk_window_hide (window);
|
||||
gdk_window_reparent (window, NULL, 0, 0);
|
||||
|
||||
gdk_flush ();
|
||||
gdk_error_trap_pop ();
|
||||
}
|
||||
}
|
||||
|
||||
if (private->colormap)
|
||||
gdk_colormap_unref (private->colormap);
|
||||
|
||||
private->mapped = FALSE;
|
||||
private->drawable.destroyed = TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
case GDK_WINDOW_ROOT:
|
||||
g_error ("attempted to destroy root window");
|
||||
break;
|
||||
|
||||
case GDK_WINDOW_PIXMAP:
|
||||
g_error ("called gdk_window_destroy on a pixmap (use gdk_pixmap_unref)");
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
/* Invalidate the area. */
|
||||
r.x = private->x;
|
||||
r.y = private->y;
|
||||
r.width = GDK_DRAWABLE_IMPL_FBDATA (window)->width;
|
||||
r.height = GDK_DRAWABLE_IMPL_FBDATA (window)->height;
|
||||
gdk_window_invalidate_rect_clear ((GdkWindow *)private->parent, &r);
|
||||
}
|
||||
|
||||
/* This function is called when the XWindow is really gone. */
|
||||
|
||||
static gboolean
|
||||
all_parents_shown (GdkWindowObject *private)
|
||||
{
|
||||
@ -417,32 +317,6 @@ send_map_events (GdkWindowObject *private, gboolean is_map)
|
||||
if (is_map)
|
||||
gdk_window_clear ((GdkWindow *)private);
|
||||
|
||||
#if 0
|
||||
event = gdk_event_new ();
|
||||
event->expose.type = GDK_EXPOSE;
|
||||
event->expose.window = gdk_window_ref ((GdkWindow *)private);
|
||||
if (GDK_DRAWABLE_IMPL_FBDATA (private)->abs_x > GDK_DRAWABLE_IMPL_FBDATA (parent)->llim_x)
|
||||
event->expose.area.x = 0;
|
||||
else
|
||||
event->expose.area.x = GDK_DRAWABLE_IMPL_FBDATA (parent)->llim_x - GDK_DRAWABLE_IMPL_FBDATA (private)->abs_x;
|
||||
|
||||
if (GDK_DRAWABLE_IMPL_FBDATA (private)->abs_y > GDK_DRAWABLE_IMPL_FBDATA (parent)->llim_y)
|
||||
event->expose.area.y = 0;
|
||||
else
|
||||
event->expose.area.y = GDK_DRAWABLE_IMPL_FBDATA (parent)->llim_y - GDK_DRAWABLE_IMPL_FBDATA (private)->abs_y;
|
||||
|
||||
event->expose.area.width = MIN (GDK_DRAWABLE_IMPL_FBDATA (private)->width,
|
||||
GDK_DRAWABLE_IMPL_FBDATA (private)->lim_x - GDK_DRAWABLE_IMPL_FBDATA (private)->abs_x);
|
||||
event->expose.area.height = MIN (GDK_DRAWABLE_IMPL_FBDATA (private)->height,
|
||||
GDK_DRAWABLE_IMPL_FBDATA (private)->lim_y - GDK_DRAWABLE_IMPL_FBDATA (private)->abs_y);
|
||||
if (event->expose.area.width > 0 &&
|
||||
event->expose.area.height > 0)
|
||||
{
|
||||
gdk_event_queue_append (event);
|
||||
}
|
||||
else
|
||||
gdk_event_free (event);
|
||||
#endif
|
||||
for (l = private->children; l; l = l->next)
|
||||
send_map_events (l->data, is_map);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user