* widget.c (update_wm_hints): Return if wmshell is null.

(widget_update_wm_size_hints): New function.

* widget.h (widget_update_wm_size_hints): Declare.

* xterm.c (x_wm_set_size_hint): If USE_X_TOOLKIT, call
widget_update_wm_size_hints.

Fixes: debbugs:10104
This commit is contained in:
Jan Djärv 2011-12-03 20:15:20 +01:00
parent cac8708fde
commit c052ead41f
4 changed files with 30 additions and 0 deletions

View file

@ -1,3 +1,13 @@
2011-12-03 Jan Djärv <jan.h.d@swipnet.se>
* widget.c (update_wm_hints): Return if wmshell is null.
(widget_update_wm_size_hints): New function.
* widget.h (widget_update_wm_size_hints): Declare.
* xterm.c (x_wm_set_size_hint): If USE_X_TOOLKIT, call
widget_update_wm_size_hints (Bug#10104).
2011-12-03 Eli Zaretskii <eliz@gnu.org>
* xdisp.c (handle_invisible_prop): If the invisible text ends just

View file

@ -476,6 +476,9 @@ update_wm_hints (EmacsFrame ew)
int base_height;
int min_rows = 0, min_cols = 0;
/* This happens when the frame is just created. */
if (! wmshell) return;
#if 0
check_frame_size (ew->emacs_frame.frame, &min_rows, &min_cols);
#endif
@ -506,6 +509,14 @@ update_wm_hints (EmacsFrame ew)
NULL);
}
void
widget_update_wm_size_hints (Widget widget)
{
EmacsFrame ew = (EmacsFrame)widget;
update_wm_hints (ew);
}
#if 0
static void

View file

@ -95,5 +95,6 @@ extern struct _DisplayContext* display_context;
/* Special entry points */
void EmacsFrameSetCharSize (Widget, int, int);
void widget_store_internal_border (Widget widget);
void widget_update_wm_size_hints (Widget widget);
#endif /* _EmacsFrame_h */

View file

@ -9561,6 +9561,14 @@ x_wm_set_size_hint (struct frame *f, long flags, int user_position)
XSizeHints size_hints;
Window window = FRAME_OUTER_WINDOW (f);
#ifdef USE_X_TOOLKIT
if (f->output_data.x->widget)
{
widget_update_wm_size_hints (f->output_data.x->widget);
return;
}
#endif
/* Setting PMaxSize caused various problems. */
size_hints.flags = PResizeInc | PMinSize /* | PMaxSize */;