Commit 1c77b5f9 authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

Removed, because that's what a NULL comparison function means. And it

Tue Apr  7 19:36:48 1998  Owen Taylor  <owt1@cornell.edu>

	* gutils.c (g_direct_compare): Removed, because that's what
	a NULL comparison function means. And it wasn't 64 bit safe.

Tue Apr  7 19:14:03 1998  Owen Taylor  <owt1@cornell.edu>

	* gdk/gdkpixmap.c: Added maximum field widths to prevent
	possible '%s' scanf overflows. Replaced scanf("%c")
	with getc(), Don't interpret /*/ as a full comment. Use
	g_realloc/g_new.

	* gtk/gtkwidget.h gtk/gtkprivate.h: Changed all flag
	tests to check for ((GTK_WIDGET_FLAGS(widget) & FLAG) != 0)
	instead of (GTK_WIDGET_FLAGS(widget) & FLAG)

	* gtk/gtkfilesel.c: Use getwd() instead of getcwd() on
	SunOS, because getcwd() hangs up in a wait4().
	(Found by David Monniaux <monniaux@clipper.ens.fr>)

	- Check device/inode/mtime not just inode/mtime, when
	caching scanned directories.
	(From: scottk@ig.utexas.edu (Scott Kempf))

	* gdk/gdkpixmap.c: Check for 0 width/height when
	creating pixmaps.

	* gtk/*.c: Global substitution of recently introduced
	"MAX (0," for allocations to "MAX (1,", since
	creating a backing pixmap with a zero width or height
	fails.

	* gdk/gdkwindow.c (gdk_window_new): Don't set all the
	WM properties for child windows. Don't set the base
	size, since the value we set will be taken as a minimum
	size.
parent 13de9dc3
Tue Apr 7 19:14:03 1998 Owen Taylor <owt1@cornell.edu>
* gdk/gdkpixmap.c: Added maximum field widths to prevent
possible '%s' scanf overflows. Replaced scanf("%c")
with getc(), Don't interpret /*/ as a full comment. Use
g_realloc/g_new.
* gtk/gtkwidget.h gtk/gtkprivate.h: Changed all flag
tests to check for ((GTK_WIDGET_FLAGS(widget) & FLAG) != 0)
instead of (GTK_WIDGET_FLAGS(widget) & FLAG)
* gtk/gtkfilesel.c: Use getwd() instead of getcwd() on
SunOS, because getcwd() hangs up in a wait4().
(Found by David Monniaux <monniaux@clipper.ens.fr>)
- Check device/inode/mtime not just inode/mtime, when
caching scanned directories.
(From: scottk@ig.utexas.edu (Scott Kempf))
* gdk/gdkpixmap.c: Check for 0 width/height when
creating pixmaps.
* gtk/*.c: Global substitution of recently introduced
"MAX (0," for allocations to "MAX (1,", since
creating a backing pixmap with a zero width or height
fails.
* gdk/gdkwindow.c (gdk_window_new): Don't set all the
WM properties for child windows. Don't set the base
size, since the value we set will be taken as a minimum
size.
Wed Apr 8 00:00:48 1998 Tim Janik <timj@gtk.org>
* gtk/gtklabel.c (gtk_label_expose): don't take '\n' into account for
......
Tue Apr 7 19:14:03 1998 Owen Taylor <owt1@cornell.edu>
* gdk/gdkpixmap.c: Added maximum field widths to prevent
possible '%s' scanf overflows. Replaced scanf("%c")
with getc(), Don't interpret /*/ as a full comment. Use
g_realloc/g_new.
* gtk/gtkwidget.h gtk/gtkprivate.h: Changed all flag
tests to check for ((GTK_WIDGET_FLAGS(widget) & FLAG) != 0)
instead of (GTK_WIDGET_FLAGS(widget) & FLAG)
* gtk/gtkfilesel.c: Use getwd() instead of getcwd() on
SunOS, because getcwd() hangs up in a wait4().
(Found by David Monniaux <monniaux@clipper.ens.fr>)
- Check device/inode/mtime not just inode/mtime, when
caching scanned directories.
(From: scottk@ig.utexas.edu (Scott Kempf))
* gdk/gdkpixmap.c: Check for 0 width/height when
creating pixmaps.
* gtk/*.c: Global substitution of recently introduced
"MAX (0," for allocations to "MAX (1,", since
creating a backing pixmap with a zero width or height
fails.
* gdk/gdkwindow.c (gdk_window_new): Don't set all the
WM properties for child windows. Don't set the base
size, since the value we set will be taken as a minimum
size.
Wed Apr 8 00:00:48 1998 Tim Janik <timj@gtk.org>
* gtk/gtklabel.c (gtk_label_expose): don't take '\n' into account for
......
Tue Apr 7 19:14:03 1998 Owen Taylor <owt1@cornell.edu>
* gdk/gdkpixmap.c: Added maximum field widths to prevent
possible '%s' scanf overflows. Replaced scanf("%c")
with getc(), Don't interpret /*/ as a full comment. Use
g_realloc/g_new.
* gtk/gtkwidget.h gtk/gtkprivate.h: Changed all flag
tests to check for ((GTK_WIDGET_FLAGS(widget) & FLAG) != 0)
instead of (GTK_WIDGET_FLAGS(widget) & FLAG)
* gtk/gtkfilesel.c: Use getwd() instead of getcwd() on
SunOS, because getcwd() hangs up in a wait4().
(Found by David Monniaux <monniaux@clipper.ens.fr>)
- Check device/inode/mtime not just inode/mtime, when
caching scanned directories.
(From: scottk@ig.utexas.edu (Scott Kempf))
* gdk/gdkpixmap.c: Check for 0 width/height when
creating pixmaps.
* gtk/*.c: Global substitution of recently introduced
"MAX (0," for allocations to "MAX (1,", since
creating a backing pixmap with a zero width or height
fails.
* gdk/gdkwindow.c (gdk_window_new): Don't set all the
WM properties for child windows. Don't set the base
size, since the value we set will be taken as a minimum
size.
Wed Apr 8 00:00:48 1998 Tim Janik <timj@gtk.org>
* gtk/gtklabel.c (gtk_label_expose): don't take '\n' into account for
......
Tue Apr 7 19:14:03 1998 Owen Taylor <owt1@cornell.edu>
* gdk/gdkpixmap.c: Added maximum field widths to prevent
possible '%s' scanf overflows. Replaced scanf("%c")
with getc(), Don't interpret /*/ as a full comment. Use
g_realloc/g_new.
* gtk/gtkwidget.h gtk/gtkprivate.h: Changed all flag
tests to check for ((GTK_WIDGET_FLAGS(widget) & FLAG) != 0)
instead of (GTK_WIDGET_FLAGS(widget) & FLAG)
* gtk/gtkfilesel.c: Use getwd() instead of getcwd() on
SunOS, because getcwd() hangs up in a wait4().
(Found by David Monniaux <monniaux@clipper.ens.fr>)
- Check device/inode/mtime not just inode/mtime, when
caching scanned directories.
(From: scottk@ig.utexas.edu (Scott Kempf))
* gdk/gdkpixmap.c: Check for 0 width/height when
creating pixmaps.
* gtk/*.c: Global substitution of recently introduced
"MAX (0," for allocations to "MAX (1,", since
creating a backing pixmap with a zero width or height
fails.
* gdk/gdkwindow.c (gdk_window_new): Don't set all the
WM properties for child windows. Don't set the base
size, since the value we set will be taken as a minimum
size.
Wed Apr 8 00:00:48 1998 Tim Janik <timj@gtk.org>
* gtk/gtklabel.c (gtk_label_expose): don't take '\n' into account for
......
Tue Apr 7 19:14:03 1998 Owen Taylor <owt1@cornell.edu>
* gdk/gdkpixmap.c: Added maximum field widths to prevent
possible '%s' scanf overflows. Replaced scanf("%c")
with getc(), Don't interpret /*/ as a full comment. Use
g_realloc/g_new.
* gtk/gtkwidget.h gtk/gtkprivate.h: Changed all flag
tests to check for ((GTK_WIDGET_FLAGS(widget) & FLAG) != 0)
instead of (GTK_WIDGET_FLAGS(widget) & FLAG)
* gtk/gtkfilesel.c: Use getwd() instead of getcwd() on
SunOS, because getcwd() hangs up in a wait4().
(Found by David Monniaux <monniaux@clipper.ens.fr>)
- Check device/inode/mtime not just inode/mtime, when
caching scanned directories.
(From: scottk@ig.utexas.edu (Scott Kempf))
* gdk/gdkpixmap.c: Check for 0 width/height when
creating pixmaps.
* gtk/*.c: Global substitution of recently introduced
"MAX (0," for allocations to "MAX (1,", since
creating a backing pixmap with a zero width or height
fails.
* gdk/gdkwindow.c (gdk_window_new): Don't set all the
WM properties for child windows. Don't set the base
size, since the value we set will be taken as a minimum
size.
Wed Apr 8 00:00:48 1998 Tim Janik <timj@gtk.org>
* gtk/gtklabel.c (gtk_label_expose): don't take '\n' into account for
......
Tue Apr 7 19:14:03 1998 Owen Taylor <owt1@cornell.edu>
* gdk/gdkpixmap.c: Added maximum field widths to prevent
possible '%s' scanf overflows. Replaced scanf("%c")
with getc(), Don't interpret /*/ as a full comment. Use
g_realloc/g_new.
* gtk/gtkwidget.h gtk/gtkprivate.h: Changed all flag
tests to check for ((GTK_WIDGET_FLAGS(widget) & FLAG) != 0)
instead of (GTK_WIDGET_FLAGS(widget) & FLAG)
* gtk/gtkfilesel.c: Use getwd() instead of getcwd() on
SunOS, because getcwd() hangs up in a wait4().
(Found by David Monniaux <monniaux@clipper.ens.fr>)
- Check device/inode/mtime not just inode/mtime, when
caching scanned directories.
(From: scottk@ig.utexas.edu (Scott Kempf))
* gdk/gdkpixmap.c: Check for 0 width/height when
creating pixmaps.
* gtk/*.c: Global substitution of recently introduced
"MAX (0," for allocations to "MAX (1,", since
creating a backing pixmap with a zero width or height
fails.
* gdk/gdkwindow.c (gdk_window_new): Don't set all the
WM properties for child windows. Don't set the base
size, since the value we set will be taken as a minimum
size.
Wed Apr 8 00:00:48 1998 Tim Janik <timj@gtk.org>
* gtk/gtklabel.c (gtk_label_expose): don't take '\n' into account for
......
Tue Apr 7 19:14:03 1998 Owen Taylor <owt1@cornell.edu>
* gdk/gdkpixmap.c: Added maximum field widths to prevent
possible '%s' scanf overflows. Replaced scanf("%c")
with getc(), Don't interpret /*/ as a full comment. Use
g_realloc/g_new.
* gtk/gtkwidget.h gtk/gtkprivate.h: Changed all flag
tests to check for ((GTK_WIDGET_FLAGS(widget) & FLAG) != 0)
instead of (GTK_WIDGET_FLAGS(widget) & FLAG)
* gtk/gtkfilesel.c: Use getwd() instead of getcwd() on
SunOS, because getcwd() hangs up in a wait4().
(Found by David Monniaux <monniaux@clipper.ens.fr>)
- Check device/inode/mtime not just inode/mtime, when
caching scanned directories.
(From: scottk@ig.utexas.edu (Scott Kempf))
* gdk/gdkpixmap.c: Check for 0 width/height when
creating pixmaps.
* gtk/*.c: Global substitution of recently introduced
"MAX (0," for allocations to "MAX (1,", since
creating a backing pixmap with a zero width or height
fails.
* gdk/gdkwindow.c (gdk_window_new): Don't set all the
WM properties for child windows. Don't set the base
size, since the value we set will be taken as a minimum
size.
Wed Apr 8 00:00:48 1998 Tim Janik <timj@gtk.org>
* gtk/gtklabel.c (gtk_label_expose): don't take '\n' into account for
......
......@@ -99,6 +99,9 @@ TODO AFTER GTK 1.0
* Entry should have a password mode (and it should show stars
for user feedback).
* Entry should allow set_usize to work better, and should compute
a different width when a maximum length is used.
* More dialogs: Print, GtkFontSelector, maybe others...
* Multiple document interface (MDI)?
......@@ -191,13 +194,13 @@ TODO AFTER GTK 1.0
aaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
as:
| Maximum column
| Maximum column
aaaaaaaaaaa bbbbbbbbbbb|
bbbbbbbbbbbbbbbbbbbbbbb|
bbbbbbbbb |
Instead of:
|
|
aaaaaaaaaaa |
bbbbbbbbbbbbbbbbbbbbbbb|
bbbbbbbbbbbbbbbbbbbb |
......@@ -212,6 +215,8 @@ TODO AFTER GTK 1.0
- Really big font (150 pt), plus lots of editing caused segfault
- "changed" emitted when doing deletes on empty Text widget.
? Allow moving the separator for paned widgets by dragging
it directly instead of using the handle.
......@@ -257,3 +262,13 @@ TODO AFTER GTK 1.0
Fix: Only send GDK_EVENT_CONFIGURE when the window is resized,
create a new event type for toplevel motion. (GDK_EVENT_REPOSITION?)
and eliminate the resize count in GtkWindow.
* Generic ScrolledWindow interface, which provide automatic scrollbar
capability to Viewport, Text, and CList widgets.
GTK_POLICY_NEVER for scrolled windows.
* Consider caching more state in GdkWindowPrivate. Currently,
every widget realization involves a XGetGeometry and a
XGetWindowAttributes. And every GdkWindow destruction
involves a XQueryTree.
......@@ -44,6 +44,7 @@ gdk_pixmap_new (GdkWindow *window,
GdkWindowPrivate *window_private;
g_return_val_if_fail ((window != NULL) || (depth != -1), NULL);
g_return_val_if_fail ((width != 0) && (height != 0), NULL);
if (!window)
window = (GdkWindow*) &gdk_root_parent;
......@@ -87,6 +88,7 @@ gdk_bitmap_create_from_data (GdkWindow *window,
GdkWindowPrivate *window_private;
g_return_val_if_fail (data != NULL, NULL);
g_return_val_if_fail ((width != 0) && (height != 0), NULL);
if (!window)
window = (GdkWindow*) &gdk_root_parent;
......@@ -135,6 +137,7 @@ gdk_pixmap_create_from_data (GdkWindow *window,
g_return_val_if_fail (fg != NULL, NULL);
g_return_val_if_fail (bg != NULL, NULL);
g_return_val_if_fail ((window != NULL) || (depth != -1), NULL);
g_return_val_if_fail ((width != 0) && (height != 0), NULL);
if (!window)
window = (GdkWindow*) &gdk_root_parent;
......@@ -179,13 +182,13 @@ gdk_pixmap_seek_string (FILE *infile,
while (!feof (infile))
{
fscanf (infile, "%s", instr);
fscanf (infile, "%1023s", instr);
if (skip_comments == TRUE && strcmp (instr, "/*") == 0)
{
fscanf (infile, "%s", instr);
fscanf (infile, "%1023s", instr);
while (!feof (infile) && strcmp (instr, "*/") != 0)
fscanf (infile, "%s", instr);
fscanf(infile, "%s", instr);
fscanf (infile, "%1023s", instr);
fscanf(infile, "%1023s", instr);
}
if (strcmp (instr, str)==0)
return TRUE;
......@@ -198,29 +201,31 @@ gint
gdk_pixmap_seek_char (FILE *infile,
gchar c)
{
gchar b, oldb;
gint b, oldb;
while (!feof (infile))
while ((b = getc(infile)) != EOF)
{
fscanf(infile, "%c", &b);
if (c != b && b == '/')
{
fscanf (infile, "%c", &b);
if (b == '*')
{
oldb = b;
while (!feof (infile) && !(oldb == '*' && b == '/'))
{
oldb = b;
fscanf (infile, "%c", &b);
}
fscanf (infile, "%c", &b);
}
{
b = getc (infile);
if (b == EOF)
return FALSE;
else if (b == '*') /* we have a comment */
{
b = -1;
do
{
oldb = b;
b = getc (infile);
if (b == EOF)
return FALSE;
}
while (!(oldb == '*' && b == '/'));
}
}
if (c == b)
return TRUE;
else if (c == b)
return TRUE;
}
return FALSE;
}
......@@ -229,31 +234,28 @@ gdk_pixmap_read_string (FILE *infile,
gchar **buffer,
guint *buffer_size)
{
gchar c;
gint c;
guint cnt = 0;
if ((*buffer) == NULL)
{
(*buffer_size) = 10 * sizeof (gchar);
(*buffer) = (gchar *) malloc (*buffer_size);
(*buffer) = g_new(gchar, *buffer_size);
}
do
fscanf (infile, "%c", &c);
while (!feof (infile) && c != '"');
c = getc (infile);
while (c != EOF && c != '"');
if (c != '"')
return FALSE;
while (!feof (infile))
while ((c = getc(infile)) != EOF)
{
fscanf (infile, "%c", &c);
if (cnt == (*buffer_size))
{
(*buffer_size) *= 2;
(*buffer) = (gchar *) realloc ((*buffer), *buffer_size);
}
(*buffer) = (gchar *) g_realloc ((*buffer), *buffer_size); }
if (c != '"')
(*buffer)[cnt++] = c;
......@@ -329,7 +331,7 @@ gdk_pixmap_extract_color (gchar *buffer)
while (finished == FALSE)
{
sscanf (ptr, "%s", temp);
sscanf (ptr, "%127s", temp);
if ((gint)ptr[0] == 0 || strcmp ("s", temp) == 0 || strcmp ("m", temp) == 0 ||
strcmp ("g", temp) == 0 || strcmp ("g4", temp) == 0)
......
......@@ -355,6 +355,10 @@ gdk_window_new (GdkWindow *parent,
gdk_window_ref (window);
gdk_xid_table_insert (&private->xwindow, window);
gdk_window_set_cursor (window, ((attributes_mask & GDK_WA_CURSOR) ?
(attributes->cursor) :
NULL));
switch (private->window_type)
{
case GDK_WINDOW_DIALOG:
......@@ -368,26 +372,31 @@ gdk_window_new (GdkWindow *parent,
(colormap != gdk_colormap_get_system ()) &&
(colormap != gdk_window_get_colormap (gdk_window_get_toplevel (window))))
{
g_print ("adding colormap window\n");
GDK_NOTE (MISC, g_print ("adding colormap window\n"));
gdk_window_add_colormap_windows (window);
}
break;
return window;
default:
break;
return window;
}
size_hints.flags = PSize | PBaseSize;
size_hints.flags = PSize;
size_hints.width = private->width;
size_hints.height = private->height;
size_hints.base_width = private->width;
size_hints.base_height = private->height;
wm_hints.flags = InputHint | StateHint | WindowGroupHint;
wm_hints.window_group = gdk_leader_window;
wm_hints.input = True;
wm_hints.initial_state = NormalState;
/* FIXME: Is there any point in doing this? Do any WM's pay
* attention to PSize, and even if they do, is this the
* correct value???
*/
XSetWMNormalHints (private->xdisplay, private->xwindow, &size_hints);
XSetWMHints (private->xdisplay, private->xwindow, &wm_hints);
if (attributes_mask & GDK_WA_TITLE)
......@@ -409,9 +418,6 @@ gdk_window_new (GdkWindow *parent,
XFree (class_hint);
}
gdk_window_set_cursor (window, ((attributes_mask & GDK_WA_CURSOR) ?
(attributes->cursor) :
NULL));
return window;
}
......
......@@ -44,6 +44,7 @@ gdk_pixmap_new (GdkWindow *window,
GdkWindowPrivate *window_private;
g_return_val_if_fail ((window != NULL) || (depth != -1), NULL);
g_return_val_if_fail ((width != 0) && (height != 0), NULL);
if (!window)
window = (GdkWindow*) &gdk_root_parent;
......@@ -87,6 +88,7 @@ gdk_bitmap_create_from_data (GdkWindow *window,
GdkWindowPrivate *window_private;
g_return_val_if_fail (data != NULL, NULL);
g_return_val_if_fail ((width != 0) && (height != 0), NULL);
if (!window)
window = (GdkWindow*) &gdk_root_parent;
......@@ -135,6 +137,7 @@ gdk_pixmap_create_from_data (GdkWindow *window,
g_return_val_if_fail (fg != NULL, NULL);
g_return_val_if_fail (bg != NULL, NULL);
g_return_val_if_fail ((window != NULL) || (depth != -1), NULL);
g_return_val_if_fail ((width != 0) && (height != 0), NULL);
if (!window)
window = (GdkWindow*) &gdk_root_parent;
......@@ -179,13 +182,13 @@ gdk_pixmap_seek_string (FILE *infile,
while (!feof (infile))
{
fscanf (infile, "%s", instr);
fscanf (infile, "%1023s", instr);
if (skip_comments == TRUE && strcmp (instr, "/*") == 0)
{
fscanf (infile, "%s", instr);
fscanf (infile, "%1023s", instr);
while (!feof (infile) && strcmp (instr, "*/") != 0)
fscanf (infile, "%s", instr);
fscanf(infile, "%s", instr);
fscanf (infile, "%1023s", instr);
fscanf(infile, "%1023s", instr);
}
if (strcmp (instr, str)==0)
return TRUE;
......@@ -198,29 +201,31 @@ gint
gdk_pixmap_seek_char (FILE *infile,
gchar c)
{
gchar b, oldb;
gint b, oldb;
while (!feof (infile))
while ((b = getc(infile)) != EOF)
{
fscanf(infile, "%c", &b);
if (c != b && b == '/')
{
fscanf (infile, "%c", &b);
if (b == '*')
{
oldb = b;
while (!feof (infile) && !(oldb == '*' && b == '/'))
{
oldb = b;
fscanf (infile, "%c", &b);
}
fscanf (infile, "%c", &b);
}
{
b = getc (infile);
if (b == EOF)
return FALSE;
else if (b == '*') /* we have a comment */
{
b = -1;
do
{
oldb = b;
b = getc (infile);
if (b == EOF)
return FALSE;
}
while (!(oldb == '*' && b == '/'));
}
}
if (c == b)
return TRUE;
else if (c == b)
return TRUE;
}
return FALSE;
}
......@@ -229,31 +234,28 @@ gdk_pixmap_read_string (FILE *infile,
gchar **buffer,
guint *buffer_size)
{
gchar c;
gint c;
guint cnt = 0;
if ((*buffer) == NULL)
{
(*buffer_size) = 10 * sizeof (gchar);
(*buffer) = (gchar *) malloc (*buffer_size);
(*buffer) = g_new(gchar, *buffer_size);
}
do
fscanf (infile, "%c", &c);
while (!feof (infile) && c != '"');
c = getc (infile);
while (c != EOF && c != '"');
if (c != '"')
return FALSE;
while (!feof (infile))
while ((c = getc(infile)) != EOF)
{
fscanf (infile, "%c", &c);
if (cnt == (*buffer_size))
{
(*buffer_size) *= 2;
(*buffer) = (gchar *) realloc ((*buffer), *buffer_size);
}
(*buffer) = (gchar *) g_realloc ((*buffer), *buffer_size); }
if (c != '"')
(*buffer)[cnt++] = c;
......@@ -329,7 +331,7 @@ gdk_pixmap_extract_color (gchar *buffer)
while (finished == FALSE)
{
sscanf (ptr, "%s", temp);
sscanf (ptr, "%127s", temp);
if ((gint)ptr[0] == 0 || strcmp ("s", temp) == 0 || strcmp ("m", temp) == 0 ||
strcmp ("g", temp) == 0 || strcmp ("g4", temp) == 0)
......
......@@ -355,6 +355,10 @@ gdk_window_new (GdkWindow *parent,
gdk_window_ref (window);
gdk_xid_table_insert (&private->xwindow, window);
gdk_window_set_cursor (window, ((attributes_mask & GDK_WA_CURSOR) ?
(attributes->cursor) :
NULL));
switch (private->window_type)
{
case GDK_WINDOW_DIALOG:
......@@ -368,26 +372,31 @@ gdk_window_new (GdkWindow *parent,
(colormap != gdk_colormap_get_system ()) &&
(colormap != gdk_window_get_colormap (gdk_window_get_toplevel (window))))
{
g_print ("adding colormap window\n");
GDK_NOTE (MISC, g_print ("adding colormap window\n"));
gdk_window_add_colormap_windows (window);
}
break;
return window;
default:
break;
return window;
}
size_hints.flags = PSize | PBaseSize;
size_hints.flags = PSize;
size_hints.width = private->width;
size_hints.height = private->height;
size_hints.base_width = private->width;
size_hints.base_height = private->height;
wm_hints.flags = InputHint | StateHint | WindowGroupHint;
wm_hints.window_group = gdk_leader_window;
wm_hints.input = True;
wm_hints.initial_state = NormalState;
/* FIXME: Is there any point in doing this? Do any WM's pay
* attention to PSize, and even if they do, is this the
* correct value???
*/
XSetWMNormalHints (private->xdisplay, private->xwindow, &size_hints);
XSetWMHints (private->xdisplay, private->xwindow, &wm_hints);
if (attributes_mask & GDK_WA_TITLE)
......@@ -409,9 +418,6 @@ gdk_window_new (GdkWindow *parent,
XFree (class_hint);
}
gdk_window_set_cursor (window, ((attributes_mask & GDK_WA_CURSOR) ?
(attributes->cursor) :
NULL));
return window;
}
......
Tue Apr 7 19:36:48 1998 Owen Taylor <owt1@cornell.edu>
* gutils.c (g_direct_compare): Removed, because that's what
a NULL comparison function means. And it wasn't 64 bit safe.
Mon Apr 6 18:43:25 1998 Tim Janik <timj@gtk.org>
* gscanner.c (g_scanner_get_token_ll): fixed a bug that caused floats
......
......@@ -912,11 +912,6 @@ g_parse_debug_string (const gchar *string,
guint
g_direct_hash(gpointer key)
{
return (guint)key;
return (guint)key;
}
gint
g_direct_compare(gpointer a, gpointer b)
{
return (gint)b - (gint)a;
}
......@@ -316,8 +316,8 @@ gtk_aspect_frame_size_allocate (GtkWidget *widget,
/* make sure we don't allocate a negative width or height,
* since that will be cast to a (very big) guint16 */
width = MAX (0, width);
height = MAX (0, height);
width = MAX (1, width);
height = MAX (1, height);
if (ratio * height > width)
{
......
......@@ -421,9 +421,9 @@ gtk_button_size_allocate (GtkWidget *widget,
child_allocation.x = (CHILD_SPACING + GTK_WIDGET (widget)->style->klass->xthickness);
child_allocation.y = (CHILD_SPACING + GTK_WIDGET (widget)->style->klass->ythickness);