Mercurial > emacs
comparison src/xmenu.c @ 109184:04ae6087d3c0
Fix frame sizing for Lucid/Motif/Lesstif.
* xfns.c (x_window): Set borderWidth to 0 for pane and
EmacsFrame. Frame size calculation is wrong otherwise.
* xmenu.c (set_frame_menubar): Must realize menubar_widget to get the
correct size for Motif.
(free_frame_menubar): Call x_set_window_size to update frame size.
author | Jan D <jan.h.d@swipnet.se> |
---|---|
date | Fri, 09 Jul 2010 18:39:51 +0200 |
parents | 8cfee7d2955f |
children | 60516122d066 |
comparison
equal
deleted
inserted
replaced
109183:a0cffb71f267 | 109184:04ae6087d3c0 |
---|---|
1283 apply_systemfont_to_menu (menubar_widget); | 1283 apply_systemfont_to_menu (menubar_widget); |
1284 #endif | 1284 #endif |
1285 } | 1285 } |
1286 | 1286 |
1287 { | 1287 { |
1288 if (f->output_data.x->menubar_widget) | |
1289 XtRealizeWidget (f->output_data.x->menubar_widget); | |
1290 | |
1288 int menubar_size | 1291 int menubar_size |
1289 = (f->output_data.x->menubar_widget | 1292 = (f->output_data.x->menubar_widget |
1290 ? (f->output_data.x->menubar_widget->core.height | 1293 ? (f->output_data.x->menubar_widget->core.height |
1291 + f->output_data.x->menubar_widget->core.border_width) | 1294 + f->output_data.x->menubar_widget->core.border_width) |
1292 : 0); | 1295 : 0); |
1383 XtVaGetValues (f->output_data.x->widget, XtNx, &x1, XtNy, &y1, NULL); | 1386 XtVaGetValues (f->output_data.x->widget, XtNx, &x1, XtNy, &y1, NULL); |
1384 if (x1 == 0 && y1 == 0) | 1387 if (x1 == 0 && y1 == 0) |
1385 XtVaSetValues (f->output_data.x->widget, XtNx, x0, XtNy, y0, NULL); | 1388 XtVaSetValues (f->output_data.x->widget, XtNx, x0, XtNy, y0, NULL); |
1386 } | 1389 } |
1387 #endif | 1390 #endif |
1388 | 1391 x_set_window_size (f, 0, FRAME_COLS (f), FRAME_LINES (f)); |
1389 UNBLOCK_INPUT; | 1392 UNBLOCK_INPUT; |
1390 } | 1393 } |
1391 } | 1394 } |
1392 #endif /* not USE_GTK */ | 1395 #endif /* not USE_GTK */ |
1393 | 1396 |