summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@src.gnome.org>2000-11-28 15:38:23 +0000
committerAlexander Larsson <alexl@src.gnome.org>2000-11-28 15:38:23 +0000
commit7f8a4aa1c34a328aa8287679c126680cf34529c9 (patch)
tree96a684e5f021c60d783c56113e7c5f6286d37b02
parent26b7063388a28335dd569bb9be2d2d70bb0fcd84 (diff)
downloadgdk-pixbuf-7f8a4aa1c34a328aa8287679c126680cf34529c9.tar.gz
Fix filled arcs and commit previous stuff which i somehow missed.
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLog.pre-2-06
-rw-r--r--ChangeLog.pre-2-106
-rw-r--r--ChangeLog.pre-2-26
-rw-r--r--ChangeLog.pre-2-46
-rw-r--r--ChangeLog.pre-2-66
-rw-r--r--ChangeLog.pre-2-86
-rw-r--r--gdk/linux-fb/gdkprivate-fb.h1
-rw-r--r--gdk/linux-fb/gdkwindow-fb.c76
-rw-r--r--gdk/linux-fb/mifillarc.c2
10 files changed, 90 insertions, 31 deletions
diff --git a/ChangeLog b/ChangeLog
index b1d302cbf..9c7b93e2f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2000-11-28 Alexander Larsson <alexl@redhat.com>
+ * gdk/linux-fb/mifillarc.c (miFillArcSliceSetup):
+ The default mode in X is Pie Arcs, therefore that is
+ what Gtk+ uses.
+
+2000-11-28 Alexander Larsson <alexl@redhat.com>
+
* gdk/linux-fb/gdkinput-ps2.c:
Implement correct EnterNotify/LeaveNotify:
(gdk_fb_window_send_crossing_events): New function that sends
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index b1d302cbf..9c7b93e2f 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,5 +1,11 @@
2000-11-28 Alexander Larsson <alexl@redhat.com>
+ * gdk/linux-fb/mifillarc.c (miFillArcSliceSetup):
+ The default mode in X is Pie Arcs, therefore that is
+ what Gtk+ uses.
+
+2000-11-28 Alexander Larsson <alexl@redhat.com>
+
* gdk/linux-fb/gdkinput-ps2.c:
Implement correct EnterNotify/LeaveNotify:
(gdk_fb_window_send_crossing_events): New function that sends
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index b1d302cbf..9c7b93e2f 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,5 +1,11 @@
2000-11-28 Alexander Larsson <alexl@redhat.com>
+ * gdk/linux-fb/mifillarc.c (miFillArcSliceSetup):
+ The default mode in X is Pie Arcs, therefore that is
+ what Gtk+ uses.
+
+2000-11-28 Alexander Larsson <alexl@redhat.com>
+
* gdk/linux-fb/gdkinput-ps2.c:
Implement correct EnterNotify/LeaveNotify:
(gdk_fb_window_send_crossing_events): New function that sends
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index b1d302cbf..9c7b93e2f 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,5 +1,11 @@
2000-11-28 Alexander Larsson <alexl@redhat.com>
+ * gdk/linux-fb/mifillarc.c (miFillArcSliceSetup):
+ The default mode in X is Pie Arcs, therefore that is
+ what Gtk+ uses.
+
+2000-11-28 Alexander Larsson <alexl@redhat.com>
+
* gdk/linux-fb/gdkinput-ps2.c:
Implement correct EnterNotify/LeaveNotify:
(gdk_fb_window_send_crossing_events): New function that sends
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index b1d302cbf..9c7b93e2f 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,5 +1,11 @@
2000-11-28 Alexander Larsson <alexl@redhat.com>
+ * gdk/linux-fb/mifillarc.c (miFillArcSliceSetup):
+ The default mode in X is Pie Arcs, therefore that is
+ what Gtk+ uses.
+
+2000-11-28 Alexander Larsson <alexl@redhat.com>
+
* gdk/linux-fb/gdkinput-ps2.c:
Implement correct EnterNotify/LeaveNotify:
(gdk_fb_window_send_crossing_events): New function that sends
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index b1d302cbf..9c7b93e2f 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,5 +1,11 @@
2000-11-28 Alexander Larsson <alexl@redhat.com>
+ * gdk/linux-fb/mifillarc.c (miFillArcSliceSetup):
+ The default mode in X is Pie Arcs, therefore that is
+ what Gtk+ uses.
+
+2000-11-28 Alexander Larsson <alexl@redhat.com>
+
* gdk/linux-fb/gdkinput-ps2.c:
Implement correct EnterNotify/LeaveNotify:
(gdk_fb_window_send_crossing_events): New function that sends
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index b1d302cbf..9c7b93e2f 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,5 +1,11 @@
2000-11-28 Alexander Larsson <alexl@redhat.com>
+ * gdk/linux-fb/mifillarc.c (miFillArcSliceSetup):
+ The default mode in X is Pie Arcs, therefore that is
+ what Gtk+ uses.
+
+2000-11-28 Alexander Larsson <alexl@redhat.com>
+
* gdk/linux-fb/gdkinput-ps2.c:
Implement correct EnterNotify/LeaveNotify:
(gdk_fb_window_send_crossing_events): New function that sends
diff --git a/gdk/linux-fb/gdkprivate-fb.h b/gdk/linux-fb/gdkprivate-fb.h
index b8e1b78ad..a7761b1af 100644
--- a/gdk/linux-fb/gdkprivate-fb.h
+++ b/gdk/linux-fb/gdkprivate-fb.h
@@ -110,7 +110,6 @@ struct _GdkWindowFBData
GHashTable *properties;
GdkEventMask event_mask;
- gint level;
gboolean realized : 1;
};
diff --git a/gdk/linux-fb/gdkwindow-fb.c b/gdk/linux-fb/gdkwindow-fb.c
index 728d17d1a..30e822566 100644
--- a/gdk/linux-fb/gdkwindow-fb.c
+++ b/gdk/linux-fb/gdkwindow-fb.c
@@ -37,6 +37,7 @@
static gpointer parent_class = NULL;
static void recompute_drawable (GdkDrawable *drawable);
+static void gdk_fb_window_raise (GdkWindow *window);
static void
g_free_2nd (gpointer a, gpointer b, gpointer data)
@@ -234,7 +235,6 @@ gdk_window_new (GdkWindow *parent,
{
depth = 0;
private->input_only = TRUE;
- impl->level = 10000;
impl->drawable_data.colormap = NULL;
}
@@ -246,13 +246,9 @@ gdk_window_new (GdkWindow *parent,
gdk_window_set_cursor (window, ((attributes_mask & GDK_WA_CURSOR) ?
(attributes->cursor) :
NULL));
-
+
if (parent_private)
- {
- parent_private->children = g_list_prepend (parent_private->children, window);
- if (parent_private->children->next)
- impl->level = GDK_WINDOW_FBDATA (GDK_WINDOW_P (parent_private->children->next->data)->impl)->level + 1;
- }
+ parent_private->children = g_list_prepend (parent_private->children, window);
return window;
}
@@ -617,7 +613,8 @@ gdk_window_show (GdkWindow *window)
if (!private->destroyed && !private->mapped)
{
private->mapped = TRUE;
-
+ gdk_fb_window_raise (window);
+
if (all_parents_shown ((GdkWindowObject *)private->parent))
{
GdkRectangle rect;
@@ -1071,37 +1068,39 @@ _gdk_windowing_window_clear_area_e (GdkWindow *window,
_gdk_windowing_window_clear_area (window, x, y, width, height);
}
-static gint
-compare_window_levels (gconstpointer a, gconstpointer b)
+static void
+gdk_fb_window_raise (GdkWindow *window)
{
- return (GDK_WINDOW_IMPL_FBDATA (b)->level - GDK_WINDOW_IMPL_FBDATA (a)->level);
+ GdkWindowObject *parent;
+
+ parent = GDK_WINDOW_OBJECT (window)->parent;
+
+ parent->children = g_list_remove (parent->children, window);
+ parent->children = g_list_prepend (parent->children, window);
}
-/* Child list is sorted bottom-to-top */
static void
-gdk_window_resort_children (GdkWindow *win)
+gdk_fb_window_lower (GdkWindow *window)
{
- GdkWindowObject *private = GDK_WINDOW_P(win);
+ GdkWindowObject *parent;
- private->children = g_list_sort (private->children, compare_window_levels);
+ parent = GDK_WINDOW_OBJECT (window)->parent;
- /* Now the fun part - redraw */
- if (GDK_WINDOW_P (win)->parent)
- {
- gdk_window_invalidate_rect (win, NULL, TRUE);
- }
+ parent->children = g_list_remove (parent->children, window);
+ parent->children = g_list_append (parent->children, window);
}
+
void
gdk_window_raise (GdkWindow *window)
{
g_return_if_fail (window != NULL);
g_return_if_fail (GDK_IS_WINDOW (window));
- GDK_WINDOW_IMPL_FBDATA (window)->level++;
-
- if (GDK_WINDOW_P (window)->parent)
- gdk_window_resort_children ((GdkWindow *)GDK_WINDOW_P (window)->parent);
+ gdk_fb_window_raise (window);
+
+ if (GDK_WINDOW_OBJECT (window)->parent)
+ gdk_window_invalidate_rect (window, NULL, TRUE);
}
void
@@ -1110,10 +1109,10 @@ gdk_window_lower (GdkWindow *window)
g_return_if_fail (window != NULL);
g_return_if_fail (GDK_IS_WINDOW (window));
- GDK_WINDOW_IMPL_FBDATA (window)->level--;
-
- if (GDK_WINDOW_P(window)->parent)
- gdk_window_resort_children ((GdkWindow *)GDK_WINDOW_P (window)->parent);
+ gdk_fb_window_lower (window);
+
+ if (GDK_WINDOW_OBJECT (window)->parent)
+ gdk_window_invalidate_rect (window, NULL, TRUE);
}
void
@@ -1151,7 +1150,26 @@ void
gdk_window_set_transient_for (GdkWindow *window,
GdkWindow *parent)
{
- GDK_WINDOW_IMPL_FBDATA (window)->level = GDK_WINDOW_IMPL_FBDATA (parent)->level + 1;
+ GdkWindowObject *private = GDK_WINDOW_OBJECT (window);
+ GdkWindowObject *root = GDK_WINDOW_OBJECT (gdk_parent_root);
+ int i;
+
+ g_return_if_fail (window != NULL);
+ g_return_if_fail (GDK_IS_WINDOW (window));
+
+ g_return_if_fail (parent != NULL);
+ g_return_if_fail (GDK_IS_WINDOW (parent));
+
+ g_return_if_fail (private->parent == gdk_parent_root);
+ g_return_if_fail (GDK_WINDOW_OBJECT (parent)->parent == gdk_parent_root);
+
+ root->children = g_list_remove (root->children, window);
+
+ i = g_list_index (root->children, parent);
+ if (i<0)
+ root->children = g_list_prepend (root->children, window);
+ else
+ root->children = g_list_insert (root->children, window, i);
}
void
diff --git a/gdk/linux-fb/mifillarc.c b/gdk/linux-fb/mifillarc.c
index 31571c499..9ebf6e5b2 100644
--- a/gdk/linux-fb/mifillarc.c
+++ b/gdk/linux-fb/mifillarc.c
@@ -331,7 +331,7 @@ miFillArcSliceSetup(arc, slice, pGC)
slice->max_bot_y = slice->max_top_y - 1;
slice->flip_top = FALSE;
slice->flip_bot = FALSE;
- if (0 /* pGC->arcMode == ArcPieSlice */)
+ if (1 /* pGC->arcMode == ArcPieSlice */)
{
slice->edge1_top = (angle1 < HALFCIRCLE);
slice->edge2_top = (angle2 <= HALFCIRCLE);