Outstanding patches, #58604
- From: "Matthias Clasen" <matthiasc poet de>
- To: <gtk-devel-list gnome org>
- Subject: Outstanding patches, #58604
- Date: Tue, 7 Aug 2001 20:54:33 +0200
Here is what I wrote in the bug report:
The recent changes to have generic map handling for all containers broke
the mouse handling of gtkhsv, since the private input-only window which
gtkhsv uses to get button press events is no longer mapped/unmapped.
Reinstating the gtk_hsv_map and gtk_hsv_unmap handlers fixes this,
patch appended.
And here is the patch. Ok to commit ?
Index: gtk/gtkhsv.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkhsv.c,v
retrieving revision 1.14
diff -u -r1.14 gtkhsv.c
--- gtk/gtkhsv.c 2001/07/19 14:57:12 1.14
+++ gtk/gtkhsv.c 2001/08/06 10:15:12
@@ -87,6 +87,8 @@
static void gtk_hsv_class_init (GtkHSVClass *class);
static void gtk_hsv_init (GtkHSV *hsv);
static void gtk_hsv_destroy (GtkObject *object);
+static void gtk_hsv_map (GtkWidget *widget);
+static void gtk_hsv_unmap (GtkWidget *widget);
static void gtk_hsv_realize (GtkWidget *widget);
static void gtk_hsv_unrealize (GtkWidget *widget);
static void gtk_hsv_size_request (GtkWidget *widget,
@@ -160,6 +162,8 @@
object_class->destroy = gtk_hsv_destroy;
+ widget_class->map = gtk_hsv_map;
+ widget_class->unmap = gtk_hsv_unmap;
widget_class->realize = gtk_hsv_realize;
widget_class->unrealize = gtk_hsv_unrealize;
widget_class->size_request = gtk_hsv_size_request;
@@ -261,6 +265,45 @@
/* Default signal handlers */
+
+/* Map handler for the HSV color selector */
+
+static void
+gtk_hsv_map (GtkWidget *widget)
+{
+ GtkHSV *hsv;
+ HSVPrivate *priv;
+
+ hsv = GTK_HSV (widget);
+ priv = hsv->priv;
+
+ if (GTK_WIDGET_MAPPED (widget))
+ return;
+
+ GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
+
+ gdk_window_show (priv->window);
+}
+
+/* Unmap handler for the HSV color selector */
+
+static void
+gtk_hsv_unmap (GtkWidget *widget)
+{
+ GtkHSV *hsv;
+ HSVPrivate *priv;
+
+ hsv = GTK_HSV (widget);
+ priv = hsv->priv;
+
+ if (!GTK_WIDGET_MAPPED (widget))
+ return;
+
+ GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
+
+ gdk_window_hide (priv->window);
+}
+
/* Realize handler for the HSV color selector */
static void
gtk_hsv_realize (GtkWidget *widget)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]