summaryrefslogtreecommitdiff
path: root/gdk/linux-fb/gdkdnd-fb.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@src.gnome.org>2000-11-13 17:40:23 +0000
committerAlexander Larsson <alexl@src.gnome.org>2000-11-13 17:40:23 +0000
commitbe698675c7c043e3161362b99b9dc656531c91b4 (patch)
treea3979694f4aaa32d26fc3c864380e60487d46e1f /gdk/linux-fb/gdkdnd-fb.c
parentb664be5ffb0f854c8e7464f34e93eb15227a8d2b (diff)
downloadgtk+-be698675c7c043e3161362b99b9dc656531c91b4.tar.gz
Cleanup and reindent of GtkFB.
Added some serial mouse support. Updates to latest Gtk+/pango
Diffstat (limited to 'gdk/linux-fb/gdkdnd-fb.c')
-rw-r--r--gdk/linux-fb/gdkdnd-fb.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/gdk/linux-fb/gdkdnd-fb.c b/gdk/linux-fb/gdkdnd-fb.c
index 4a66837716..d4d131cc5d 100644
--- a/gdk/linux-fb/gdkdnd-fb.c
+++ b/gdk/linux-fb/gdkdnd-fb.c
@@ -45,8 +45,6 @@ typedef enum {
* this is used on both source and destination sides.
*/
struct _GdkDragContextPrivate {
- GdkDragContext context;
-
guint ref_count;
};
@@ -55,11 +53,12 @@ struct _GdkDragContextPrivate {
static GList *contexts;
static gpointer parent_class = NULL;
+#define GDK_DRAG_CONTEXT_PRIVATE_DATA(ctx) ((GdkDragContextPrivate *) GDK_DRAG_CONTEXT (ctx)->windowing_data)
static void
gdk_drag_context_init (GdkDragContext *dragcontext)
{
- dragcontext->windowing_data = NULL;
+ dragcontext->windowing_data = g_new (GdkDragContextPrivate, 1);
contexts = g_list_prepend (contexts, dragcontext);
}
@@ -68,16 +67,22 @@ static void
gdk_drag_context_finalize (GObject *object)
{
GdkDragContext *context = GDK_DRAG_CONTEXT (object);
+ GdkDragContextPrivate *private = GDK_DRAG_CONTEXT_PRIVATE_DATA (object);
g_list_free (context->targets);
if (context->source_window)
- {
- gdk_window_unref (context->source_window);
- }
+ gdk_window_unref (context->source_window);
if (context->dest_window)
gdk_window_unref (context->dest_window);
+
+
+ if (private)
+ {
+ g_free (private);
+ context->windowing_data = NULL;
+ }
contexts = g_list_remove (contexts, context);
@@ -127,19 +132,19 @@ gdk_drag_context_get_type (void)
GdkDragContext *
gdk_drag_context_new (void)
{
- return (GdkDragContext *)g_object_new(gdk_drag_context_get_type (), NULL);
+ return (GdkDragContext *)g_object_new (gdk_drag_context_get_type (), NULL);
}
void
gdk_drag_context_ref (GdkDragContext *context)
{
- g_object_ref(G_OBJECT(context));
+ g_object_ref (G_OBJECT (context));
}
void
gdk_drag_context_unref (GdkDragContext *context)
{
- g_object_unref(G_OBJECT(context));
+ g_object_unref (G_OBJECT (context));
}
/*************************************************************
@@ -207,9 +212,9 @@ gdk_drag_find_window (GdkDragContext *context,
{
g_return_if_fail (context != NULL);
- *dest_window = gdk_window_get_pointer(NULL, &x_root, &y_root, NULL);
- if(*dest_window)
- gdk_window_ref(*dest_window);
+ *dest_window = gdk_window_get_pointer (NULL, &x_root, &y_root, NULL);
+ if (*dest_window)
+ gdk_window_ref (*dest_window);
}
gboolean