Plug same refcount leaks as in the X11 backend.
2000-05-17 Tor Lillqvist <tml@iki.fi> * gdk/win32/gdkevents-win32.c (gdk_event_translate): Plug same refcount leaks as in the X11 backend. * gdk/win32/gdkgc-win32.c (gdk_win32_gc_set_values): Logging cosmetics. * gdk/win32/gdkwindow-win32.c: Similar changes as in X11 backend. Add _gdk_windowing_window_destroy(). * gtk/gtkcolorsel.c: Include correct backend-specific header. Don't use XColor unless on X11. (No GDK_VISUAL_STATIC_COLOR either, but these probably do exist on nanox?) * gtk/gtkhsv.c: Use G_PI (fresh from <glib.h>) instead of M_PI which isn't necessarily defined by <math.h>. * gtk/gtkobject.c (gtk_object_init): Don't go up the class ancestry past GtkObject. * gtk/gtktypeutils.h: Mark GTK_TYPE_IDENTIFIER for export/import from DLL on Win32. * gtk/gtk.def: Update corresponding to recent changes. * gtk/makefile.{cygwin,msc}: Updates.
This commit is contained in:
committed by
Tor Lillqvist
parent
386ae20970
commit
8596f7edc5
@ -25,7 +25,15 @@
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#include "gdkconfig.h"
|
||||
|
||||
#if defined (GDK_WINDOWING_X11)
|
||||
#include "x11/gdkx.h"
|
||||
#elif defined (GDK_WINDOWING_WIN32)
|
||||
#include "win32/gdkwin32.h"
|
||||
#elif defined (GDK_WINDOWING_NANOX)
|
||||
#include "nanox/gdkprivate-nanox.h"
|
||||
#endif
|
||||
#include "gdk/gdkkeysyms.h"
|
||||
#include "gtkcolorsel.h"
|
||||
#include "gtkhsv.h"
|
||||
@ -891,7 +899,9 @@ grab_color_at_mouse (GtkWidget *button,
|
||||
GtkColorSelection *colorsel = data;
|
||||
ColorSelectionPrivate *priv;
|
||||
GdkColormap *colormap = gdk_colormap_get_system ();
|
||||
#if defined (GDK_WINDOWING_X11)
|
||||
XColor xcolor;
|
||||
#endif
|
||||
|
||||
priv = colorsel->private;
|
||||
|
||||
@ -912,6 +922,7 @@ grab_color_at_mouse (GtkWidget *button,
|
||||
priv->color[COLORSEL_GREEN] = (double)pixel/((1<<visual->depth) - 1);
|
||||
priv->color[COLORSEL_BLUE] = (double)pixel/((1<<visual->depth) - 1);
|
||||
break;
|
||||
#if defined (GDK_WINDOWING_X11)
|
||||
case GDK_VISUAL_STATIC_COLOR:
|
||||
xcolor.pixel = pixel;
|
||||
XQueryColor (GDK_DISPLAY (), GDK_COLORMAP_XCOLORMAP (colormap), &xcolor);
|
||||
@ -919,6 +930,7 @@ grab_color_at_mouse (GtkWidget *button,
|
||||
priv->color[COLORSEL_GREEN] = xcolor.green/65535.0;
|
||||
priv->color[COLORSEL_BLUE] = xcolor.blue/65535.0;
|
||||
break;
|
||||
#endif
|
||||
case GDK_VISUAL_PSEUDO_COLOR:
|
||||
priv->color[COLORSEL_RED] = colormap->colors[pixel].red/(double)0xffffff;
|
||||
priv->color[COLORSEL_GREEN] = colormap->colors[pixel].green/(double)0xffffff;
|
||||
|
||||
Reference in New Issue
Block a user