From c7e73be5f7c8f5d24757ace235bc622a9a7fdcd0 Mon Sep 17 00:00:00 2001 From: Jan Djärv Date: Sun, 26 Jun 2011 20:47:07 +0200 Subject: Fix wm_size-hints race between KDE/KWin and Gtk+ 3. * emacsgtkfixed.c: State that this is only used with Gtk+3. (_EmacsFixedPrivate): Remove minwidth/height. Add struct frame *f. (emacs_fixed_init): Initialize priv->f. (get_parent_class, emacs_fixed_set_min_size): Remove. (emacs_fixed_new): Set priv->f to argument. (emacs_fixed_get_preferred_width) (emacs_fixed_get_preferred_height): Use min_width/height from frames size_hint to set minimum and natural. (XSetWMSizeHints, XSetWMNormalHints): Override these functions and use min_width/height from frames size_hint to set min_width/height (Bug#8919). * emacsgtkfixed.h: State that this is only used with Gtk+3. (emacs_fixed_set_min_size): Remove. (emacs_fixed_new): Take frame as argument. * gtkutil.c (xg_create_frame_widgets): Pass f to emacs_fixed_new. (x_wm_set_size_hint): Remove call to emacs_fixed_set_min_size. Fix indentation. --- src/emacsgtkfixed.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/emacsgtkfixed.h') diff --git a/src/emacsgtkfixed.h b/src/emacsgtkfixed.h index 405374373e..dbac136bd7 100644 --- a/src/emacsgtkfixed.h +++ b/src/emacsgtkfixed.h @@ -1,4 +1,5 @@ -/* A Gtk Widget that inherits GtkFixed, but can be shrinked. +/* A Gtk Widget that inherits GtkFixed, but can be shrinked. +This file is only use when compiling with Gtk+ 3. Copyright (C) 2011 Free Software Foundation, Inc. @@ -24,6 +25,8 @@ along with GNU Emacs. If not, see . */ G_BEGIN_DECLS +struct frame; + #define EMACS_TYPE_FIXED (emacs_fixed_get_type ()) #define EMACS_FIXED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EMACS_TYPE_FIXED, EmacsFixed)) #define EMACS_FIXED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EMACS_TYPE_FIXED, EmacsFixedClass)) @@ -49,8 +52,7 @@ struct _EmacsFixedClass GtkFixedClass parent_class; }; -extern GtkWidget *emacs_fixed_new (void); -extern void emacs_fixed_set_min_size (EmacsFixed *widget, int width, int height); +extern GtkWidget *emacs_fixed_new (struct frame *f); extern GType emacs_fixed_get_type (void); G_END_DECLS -- cgit v1.2.3