aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Pierresteguy1994-04-01 13:53:31 +0000
committerFred Pierresteguy1994-04-01 13:53:31 +0000
commit7e4f2521a451d8de730bf4e97d0db9a99c707907 (patch)
treea133fdd284f32492069560283411587606759099
parent01a054bcfa98363577e3f128d8ca4fd68295d4b9 (diff)
downloademacs-7e4f2521a451d8de730bf4e97d0db9a99c707907.tar.gz
emacs-7e4f2521a451d8de730bf4e97d0db9a99c707907.zip
(x_wm_set_size_hint): Add USE_X_TOOLKIT conditional and call
XtGetValues to get the width and the height of the Emacs frame.
-rw-r--r--src/xterm.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 738a508fea3..009f01565d1 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -5441,6 +5441,9 @@ x_wm_set_size_hint (f, prompting, change_gravity, spec_x, spec_y)
5441 XSizeHints size_hints; 5441 XSizeHints size_hints;
5442 5442
5443#ifdef USE_X_TOOLKIT 5443#ifdef USE_X_TOOLKIT
5444 Arg al[2];
5445 int ac = 0;
5446 Dimension widget_width, widget_height;
5444 Window window = XtWindow (f->display.x->widget); 5447 Window window = XtWindow (f->display.x->widget);
5445#else /* not USE_X_TOOLKIT */ 5448#else /* not USE_X_TOOLKIT */
5446 Window window = FRAME_X_WINDOW (f); 5449 Window window = FRAME_X_WINDOW (f);
@@ -5452,8 +5455,16 @@ x_wm_set_size_hint (f, prompting, change_gravity, spec_x, spec_y)
5452 5455
5453 size_hints.x = f->display.x->left_pos; 5456 size_hints.x = f->display.x->left_pos;
5454 size_hints.y = f->display.x->top_pos; 5457 size_hints.y = f->display.x->top_pos;
5458#ifdef USE_X_TOOLKIT
5459 XtSetArg (al[ac], XtNwidth, &widget_width); ac++;
5460 XtSetArg (al[ac], XtNheight, &widget_height); ac++;
5461 XtGetValues (f->display.x->column_widget, al, ac);
5462 size_hints.height = widget_height;
5463 size_hints.width = widget_width;
5464#else /* not USE_X_TOOLKIT */
5455 size_hints.height = PIXEL_HEIGHT (f); 5465 size_hints.height = PIXEL_HEIGHT (f);
5456 size_hints.width = PIXEL_WIDTH (f); 5466 size_hints.width = PIXEL_WIDTH (f);
5467#endif /* not USE_X_TOOLKIT */
5457 size_hints.width_inc = FONT_WIDTH (f->display.x->font); 5468 size_hints.width_inc = FONT_WIDTH (f->display.x->font);
5458 size_hints.height_inc = FONT_HEIGHT (f->display.x->font); 5469 size_hints.height_inc = FONT_HEIGHT (f->display.x->font);
5459#if 0 5470#if 0