summaryrefslogtreecommitdiff
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
register int window_y; /* Recomputed window Y coordinate. */
unsigned long change_mask; /* Value mask to reconfigure window. */
- XWindowChanges *changes; /* Values to use in configure window. */
register Bool config_p = False; /* Reconfigure pane window? */
@@ -612,21 +611,19 @@ _XMRecomputePane(register Display *display, register XMenu *menu, register XMPan
* it for creation with the new configuration.
*/
if (p_ptr->window) {
+ XWindowChanges changes;
change_mask = (CWX | CWY | CWWidth | CWHeight);
- changes = (XWindowChanges *)malloc(sizeof(XWindowChanges));
- changes->x = p_ptr->window_x;
- changes->y = p_ptr->window_y;
- changes->width = p_ptr->window_w;
- changes->height = p_ptr->window_h;
+ changes.x = p_ptr->window_x;
+ changes.y = p_ptr->window_y;
+ changes.width = p_ptr->window_w;
+ changes.height = p_ptr->window_h;
XConfigureWindow(
display,
p_ptr->window,
change_mask,
- changes
+ &changes
);
- free(changes);
-
}
else {
if (_XMWinQueAddPane(display, menu, p_ptr) == _FAILURE) {
@@ -681,7 +678,6 @@ _XMRecomputeSelection(register Display *display, register XMenu *menu, register
/* Selection sequence number. */
{
register Bool config_s = False; /* Reconfigure selection window? */
- XWindowChanges *changes; /* Values to change in configure. */
unsigned long change_mask; /* Value mask for XConfigureWindow. */
/*
@@ -738,22 +734,19 @@ _XMRecomputeSelection(register Display *display, register XMenu *menu, register
* for creation with the new configuration.
*/
if (s_ptr->window) {
- changes = (XWindowChanges *)malloc(sizeof(XWindowChanges));
+ XWindowChanges changes;
change_mask = (CWX | CWY | CWWidth | CWHeight);
- changes = (XWindowChanges *)malloc(sizeof(XWindowChanges));
- changes->x = s_ptr->window_x;
- changes->y = s_ptr->window_y;
- changes->width = s_ptr->window_w;
- changes->height = s_ptr->window_h;
+ changes.x = s_ptr->window_x;
+ changes.y = s_ptr->window_y;
+ changes.width = s_ptr->window_w;
+ changes.height = s_ptr->window_h;
XConfigureWindow(
display,
s_ptr->window,
change_mask,
- changes
+ &changes
);
- free(changes);
-
}
else {
if (_XMWinQueAddSelection(display, menu, s_ptr) == _FAILURE) {