diff options
| author | Jan Djärv | 2011-12-03 20:15:20 +0100 |
|---|---|---|
| committer | Jan Djärv | 2011-12-03 20:15:20 +0100 |
| commit | c052ead41f5a53da9cc32e7697005fac3506a858 (patch) | |
| tree | 77d08775bc63f3abc493bde421d90d0abc01fc2a | |
| parent | cac8708fdec06853fcdaefe4651ebb71c61eebc7 (diff) | |
| download | emacs-c052ead41f5a53da9cc32e7697005fac3506a858.tar.gz emacs-c052ead41f5a53da9cc32e7697005fac3506a858.zip | |
* 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
| -rw-r--r-- | src/ChangeLog | 10 | ||||
| -rw-r--r-- | src/widget.c | 11 | ||||
| -rw-r--r-- | src/widget.h | 1 | ||||
| -rw-r--r-- | src/xterm.c | 8 |
4 files changed, 30 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 61b44593062..6a13bd87264 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2011-12-03 Jan Djärv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * widget.c (update_wm_hints): Return if wmshell is null. | ||
| 4 | (widget_update_wm_size_hints): New function. | ||
| 5 | |||
| 6 | * widget.h (widget_update_wm_size_hints): Declare. | ||
| 7 | |||
| 8 | * xterm.c (x_wm_set_size_hint): If USE_X_TOOLKIT, call | ||
| 9 | widget_update_wm_size_hints (Bug#10104). | ||
| 10 | |||
| 1 | 2011-12-03 Eli Zaretskii <eliz@gnu.org> | 11 | 2011-12-03 Eli Zaretskii <eliz@gnu.org> |
| 2 | 12 | ||
| 3 | * xdisp.c (handle_invisible_prop): If the invisible text ends just | 13 | * xdisp.c (handle_invisible_prop): If the invisible text ends just |
diff --git a/src/widget.c b/src/widget.c index 181811b8369..96bfd4787e9 100644 --- a/src/widget.c +++ b/src/widget.c | |||
| @@ -476,6 +476,9 @@ update_wm_hints (EmacsFrame ew) | |||
| 476 | int base_height; | 476 | int base_height; |
| 477 | int min_rows = 0, min_cols = 0; | 477 | int min_rows = 0, min_cols = 0; |
| 478 | 478 | ||
| 479 | /* This happens when the frame is just created. */ | ||
| 480 | if (! wmshell) return; | ||
| 481 | |||
| 479 | #if 0 | 482 | #if 0 |
| 480 | check_frame_size (ew->emacs_frame.frame, &min_rows, &min_cols); | 483 | check_frame_size (ew->emacs_frame.frame, &min_rows, &min_cols); |
| 481 | #endif | 484 | #endif |
| @@ -506,6 +509,14 @@ update_wm_hints (EmacsFrame ew) | |||
| 506 | NULL); | 509 | NULL); |
| 507 | } | 510 | } |
| 508 | 511 | ||
| 512 | void | ||
| 513 | widget_update_wm_size_hints (Widget widget) | ||
| 514 | { | ||
| 515 | EmacsFrame ew = (EmacsFrame)widget; | ||
| 516 | update_wm_hints (ew); | ||
| 517 | } | ||
| 518 | |||
| 519 | |||
| 509 | #if 0 | 520 | #if 0 |
| 510 | 521 | ||
| 511 | static void | 522 | static void |
diff --git a/src/widget.h b/src/widget.h index b5b4147b167..11041d54ad0 100644 --- a/src/widget.h +++ b/src/widget.h | |||
| @@ -95,5 +95,6 @@ extern struct _DisplayContext* display_context; | |||
| 95 | /* Special entry points */ | 95 | /* Special entry points */ |
| 96 | void EmacsFrameSetCharSize (Widget, int, int); | 96 | void EmacsFrameSetCharSize (Widget, int, int); |
| 97 | void widget_store_internal_border (Widget widget); | 97 | void widget_store_internal_border (Widget widget); |
| 98 | void widget_update_wm_size_hints (Widget widget); | ||
| 98 | 99 | ||
| 99 | #endif /* _EmacsFrame_h */ | 100 | #endif /* _EmacsFrame_h */ |
diff --git a/src/xterm.c b/src/xterm.c index e41af2b2870..290acdd9ca4 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -9561,6 +9561,14 @@ x_wm_set_size_hint (struct frame *f, long flags, int user_position) | |||
| 9561 | XSizeHints size_hints; | 9561 | XSizeHints size_hints; |
| 9562 | Window window = FRAME_OUTER_WINDOW (f); | 9562 | Window window = FRAME_OUTER_WINDOW (f); |
| 9563 | 9563 | ||
| 9564 | #ifdef USE_X_TOOLKIT | ||
| 9565 | if (f->output_data.x->widget) | ||
| 9566 | { | ||
| 9567 | widget_update_wm_size_hints (f->output_data.x->widget); | ||
| 9568 | return; | ||
| 9569 | } | ||
| 9570 | #endif | ||
| 9571 | |||
| 9564 | /* Setting PMaxSize caused various problems. */ | 9572 | /* Setting PMaxSize caused various problems. */ |
| 9565 | size_hints.flags = PResizeInc | PMinSize /* | PMaxSize */; | 9573 | size_hints.flags = PResizeInc | PMinSize /* | PMaxSize */; |
| 9566 | 9574 | ||