diff options
| author | Fred Pierresteguy | 1994-03-22 14:38:10 +0000 |
|---|---|---|
| committer | Fred Pierresteguy | 1994-03-22 14:38:10 +0000 |
| commit | edaf359bcfc043b2545810422f0cb61bb2998ca3 (patch) | |
| tree | 397111b217765667633d5351358a792b41f426fe /src/widget.c | |
| parent | ac59aed83fbdfd298f58a1a7e638264b0c3b0caa (diff) | |
| download | emacs-edaf359bcfc043b2545810422f0cb61bb2998ca3.tar.gz emacs-edaf359bcfc043b2545810422f0cb61bb2998ca3.zip | |
(set_frame_size): Put #if 0 around a lot of useless code.
Compute explicitely the geometry of the toplevel widget.
Diffstat (limited to 'src/widget.c')
| -rw-r--r-- | src/widget.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/widget.c b/src/widget.c index aabd63accd6..30f4e9e3d6f 100644 --- a/src/widget.c +++ b/src/widget.c | |||
| @@ -307,10 +307,12 @@ set_frame_size (ew) | |||
| 307 | Widget wmshell = get_wm_shell ((Widget) ew); | 307 | Widget wmshell = get_wm_shell ((Widget) ew); |
| 308 | Widget app_shell = XtParent ((Widget) wmshell); | 308 | Widget app_shell = XtParent ((Widget) wmshell); |
| 309 | 309 | ||
| 310 | |||
| 311 | if (! XtIsSubclass (wmshell, shellWidgetClass)) abort (); | 310 | if (! XtIsSubclass (wmshell, shellWidgetClass)) abort (); |
| 312 | if (! XtIsSubclass (app_shell, shellWidgetClass)) abort (); | 311 | if (! XtIsSubclass (app_shell, shellWidgetClass)) abort (); |
| 313 | 312 | ||
| 313 | /* We don't need this for the momment. The geometry is computed in | ||
| 314 | xfns.c. */ | ||
| 315 | #if 0 | ||
| 314 | /* If the EmacsFrame doesn't have a geometry but the shell does, | 316 | /* If the EmacsFrame doesn't have a geometry but the shell does, |
| 315 | treat that as the geometry of the frame. (Is this bogus? | 317 | treat that as the geometry of the frame. (Is this bogus? |
| 316 | I'm not sure.) */ | 318 | I'm not sure.) */ |
| @@ -413,7 +415,7 @@ set_frame_size (ew) | |||
| 413 | flags |= (app_flags & (WidthValue | HeightValue)); | 415 | flags |= (app_flags & (WidthValue | HeightValue)); |
| 414 | } | 416 | } |
| 415 | } | 417 | } |
| 416 | 418 | #endif /* 0 */ | |
| 417 | { | 419 | { |
| 418 | struct frame* frame = ew->emacs_frame.frame; | 420 | struct frame* frame = ew->emacs_frame.frame; |
| 419 | Dimension pixel_width, pixel_height; | 421 | Dimension pixel_width, pixel_height; |
| @@ -431,7 +433,19 @@ set_frame_size (ew) | |||
| 431 | ew->core.width = pixel_width; | 433 | ew->core.width = pixel_width; |
| 432 | ew->core.height = pixel_height; | 434 | ew->core.height = pixel_height; |
| 433 | 435 | ||
| 436 | /* Compute the geometry of the toplevel shell because on some platforms | ||
| 437 | when the geometry is not set, the widget children are resized. */ | ||
| 438 | { | ||
| 439 | int len; | ||
| 440 | char *tem; | ||
| 441 | sprintf (shell_position, "=%dx%d", pixel_width, pixel_height); | ||
| 442 | len = strlen (shell_position) + 1; | ||
| 443 | tem = (char *) xmalloc (len); | ||
| 444 | strncpy (tem, shell_position, len); | ||
| 445 | XtVaSetValues (wmshell, XtNgeometry, tem, 0); | ||
| 446 | } | ||
| 434 | 447 | ||
| 448 | #if 0 /* We don't need this also. */ | ||
| 435 | /* If a position was specified, assign it to the shell widget. | 449 | /* If a position was specified, assign it to the shell widget. |
| 436 | (Else WM won't do anything with it.) | 450 | (Else WM won't do anything with it.) |
| 437 | */ | 451 | */ |
| @@ -468,6 +482,7 @@ set_frame_size (ew) | |||
| 468 | /* Also assign the iconic status of the frame to the Shell, so that | 482 | /* Also assign the iconic status of the frame to the Shell, so that |
| 469 | the WM sees it. */ | 483 | the WM sees it. */ |
| 470 | XtVaSetValues (wmshell, XtNiconic, ew->emacs_frame.iconic, 0); | 484 | XtVaSetValues (wmshell, XtNiconic, ew->emacs_frame.iconic, 0); |
| 485 | #endif /* 0 */ | ||
| 471 | } | 486 | } |
| 472 | } | 487 | } |
| 473 | 488 | ||