aboutsummaryrefslogtreecommitdiffstats
path: root/src/emacsgtkfixed.h
diff options
context:
space:
mode:
authorJan Djärv <[email protected]>2011-06-26 20:47:07 +0200
committerJan Djärv <[email protected]>2011-06-26 20:47:07 +0200
commitc7e73be5f7c8f5d24757ace235bc622a9a7fdcd0 (patch)
treed32a59317249eaa9958627f1a6a3584db670ba46 /src/emacsgtkfixed.h
parent247f696e50461a50306bc77d3683007bd06e8ba7 (diff)
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.
Diffstat (limited to 'src/emacsgtkfixed.h')
-rw-r--r--src/emacsgtkfixed.h8
1 files changed, 5 insertions, 3 deletions
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 <http://www.gnu.org/licenses/>. */
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