aboutsummaryrefslogtreecommitdiffstats
path: root/oldXMenu/Internal.c
diff options
context:
space:
mode:
Diffstat (limited to 'oldXMenu/Internal.c')
-rw-r--r--oldXMenu/Internal.c31
1 files changed, 12 insertions, 19 deletions
diff --git a/oldXMenu/Internal.c b/oldXMenu/Internal.c
index f489e27beab..3e97f9ab3f1 100644
--- a/oldXMenu/Internal.c
+++ b/oldXMenu/Internal.c
@@ -534,7 +534,6 @@ _XMRecomputePane(register Display *display, register XMenu *menu, register XMPan
534 register int window_y; /* Recomputed window Y coordinate. */ 534 register int window_y; /* Recomputed window Y coordinate. */
535 535
536 unsigned long change_mask; /* Value mask to reconfigure window. */ 536 unsigned long change_mask; /* Value mask to reconfigure window. */
537 XWindowChanges *changes; /* Values to use in configure window. */
538 537
539 register Bool config_p = False; /* Reconfigure pane window? */ 538 register Bool config_p = False; /* Reconfigure pane window? */
540 539
@@ -612,21 +611,19 @@ _XMRecomputePane(register Display *display, register XMenu *menu, register XMPan
612 * it for creation with the new configuration. 611 * it for creation with the new configuration.
613 */ 612 */
614 if (p_ptr->window) { 613 if (p_ptr->window) {
614 XWindowChanges changes;
615 change_mask = (CWX | CWY | CWWidth | CWHeight); 615 change_mask = (CWX | CWY | CWWidth | CWHeight);
616 changes = (XWindowChanges *)malloc(sizeof(XWindowChanges)); 616 changes.x = p_ptr->window_x;
617 changes->x = p_ptr->window_x; 617 changes.y = p_ptr->window_y;
618 changes->y = p_ptr->window_y; 618 changes.width = p_ptr->window_w;
619 changes->width = p_ptr->window_w; 619 changes.height = p_ptr->window_h;
620 changes->height = p_ptr->window_h;
621 620
622 XConfigureWindow( 621 XConfigureWindow(
623 display, 622 display,
624 p_ptr->window, 623 p_ptr->window,
625 change_mask, 624 change_mask,
626 changes 625 &changes
627 ); 626 );
628 free(changes);
629
630 } 627 }
631 else { 628 else {
632 if (_XMWinQueAddPane(display, menu, p_ptr) == _FAILURE) { 629 if (_XMWinQueAddPane(display, menu, p_ptr) == _FAILURE) {
@@ -681,7 +678,6 @@ _XMRecomputeSelection(register Display *display, register XMenu *menu, register
681 /* Selection sequence number. */ 678 /* Selection sequence number. */
682{ 679{
683 register Bool config_s = False; /* Reconfigure selection window? */ 680 register Bool config_s = False; /* Reconfigure selection window? */
684 XWindowChanges *changes; /* Values to change in configure. */
685 unsigned long change_mask; /* Value mask for XConfigureWindow. */ 681 unsigned long change_mask; /* Value mask for XConfigureWindow. */
686 682
687 /* 683 /*
@@ -738,22 +734,19 @@ _XMRecomputeSelection(register Display *display, register XMenu *menu, register
738 * for creation with the new configuration. 734 * for creation with the new configuration.
739 */ 735 */
740 if (s_ptr->window) { 736 if (s_ptr->window) {
741 changes = (XWindowChanges *)malloc(sizeof(XWindowChanges)); 737 XWindowChanges changes;
742 change_mask = (CWX | CWY | CWWidth | CWHeight); 738 change_mask = (CWX | CWY | CWWidth | CWHeight);
743 changes = (XWindowChanges *)malloc(sizeof(XWindowChanges)); 739 changes.x = s_ptr->window_x;
744 changes->x = s_ptr->window_x; 740 changes.y = s_ptr->window_y;
745 changes->y = s_ptr->window_y; 741 changes.width = s_ptr->window_w;
746 changes->width = s_ptr->window_w; 742 changes.height = s_ptr->window_h;
747 changes->height = s_ptr->window_h;
748 743
749 XConfigureWindow( 744 XConfigureWindow(
750 display, 745 display,
751 s_ptr->window, 746 s_ptr->window,
752 change_mask, 747 change_mask,
753 changes 748 &changes
754 ); 749 );
755 free(changes);
756
757 } 750 }
758 else { 751 else {
759 if (_XMWinQueAddSelection(display, menu, s_ptr) == _FAILURE) { 752 if (_XMWinQueAddSelection(display, menu, s_ptr) == _FAILURE) {