Mercurial > hg > xemacs-beta
comparison src/frame-x.c @ 5126:2a462149bd6a ben-lisp-object
merge
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Wed, 24 Feb 2010 19:04:27 -0600 |
parents | b5df3737028a 6f2158fa75ed |
children | a9c41067dd88 |
comparison
equal
deleted
inserted
replaced
5125:b5df3737028a | 5126:2a462149bd6a |
---|---|
1 /* Functions for the X window system. | 1 /* Functions for the X window system. |
2 Copyright (C) 1989, 1992-5, 1997 Free Software Foundation, Inc. | 2 Copyright (C) 1989, 1992-5, 1997 Free Software Foundation, Inc. |
3 Copyright (C) 1995, 1996, 2001, 2002, 2004 Ben Wing. | 3 Copyright (C) 1995, 1996, 2001, 2002, 2004, 2010 Ben Wing. |
4 | 4 |
5 This file is part of XEmacs. | 5 This file is part of XEmacs. |
6 | 6 |
7 XEmacs is free software; you can redistribute it and/or modify it | 7 XEmacs is free software; you can redistribute it and/or modify it |
8 under the terms of the GNU General Public License as published by the | 8 under the terms of the GNU General Public License as published by the |
222 /* Not currently used. */ | 222 /* Not currently used. */ |
223 | 223 |
224 void | 224 void |
225 x_wm_mark_shell_size_user_specified (Widget wmshell) | 225 x_wm_mark_shell_size_user_specified (Widget wmshell) |
226 { | 226 { |
227 if (! XtIsWMShell (wmshell)) ABORT (); | 227 assert (XtIsWMShell (wmshell)); |
228 EmacsShellSetSizeUserSpecified (wmshell); | 228 EmacsShellSetSizeUserSpecified (wmshell); |
229 } | 229 } |
230 | 230 |
231 void | 231 void |
232 x_wm_mark_shell_position_user_specified (Widget wmshell) | 232 x_wm_mark_shell_position_user_specified (Widget wmshell) |
233 { | 233 { |
234 if (! XtIsWMShell (wmshell)) ABORT (); | 234 assert (XtIsWMShell (wmshell)); |
235 EmacsShellSetPositionUserSpecified (wmshell); | 235 EmacsShellSetPositionUserSpecified (wmshell); |
236 } | 236 } |
237 | 237 |
238 #endif | 238 #endif |
239 | 239 |
240 void | 240 void |
241 x_wm_set_shell_iconic_p (Widget shell, int iconic_p) | 241 x_wm_set_shell_iconic_p (Widget shell, int iconic_p) |
242 { | 242 { |
243 if (! XtIsWMShell (shell)) ABORT (); | 243 assert (XtIsWMShell (shell)); |
244 | 244 |
245 /* Because of questionable logic in Shell.c, this sequence can't work: | 245 /* Because of questionable logic in Shell.c, this sequence can't work: |
246 | 246 |
247 w = XtCreatePopupShell (...); | 247 w = XtCreatePopupShell (...); |
248 Xt_SET_VALUE (w, XtNiconic, True); | 248 Xt_SET_VALUE (w, XtNiconic, True); |
267 void | 267 void |
268 x_wm_set_cell_size (Widget wmshell, int cw, int ch) | 268 x_wm_set_cell_size (Widget wmshell, int cw, int ch) |
269 { | 269 { |
270 Arg al [2]; | 270 Arg al [2]; |
271 | 271 |
272 if (!XtIsWMShell (wmshell)) | 272 assert (XtIsWMShell (wmshell)); |
273 ABORT (); | 273 assert (cw > 0 && ch > 0); |
274 if (cw <= 0 || ch <= 0) | |
275 ABORT (); | |
276 | 274 |
277 Xt_SET_ARG (al[0], XtNwidthInc, cw); | 275 Xt_SET_ARG (al[0], XtNwidthInc, cw); |
278 Xt_SET_ARG (al[1], XtNheightInc, ch); | 276 Xt_SET_ARG (al[1], XtNheightInc, ch); |
279 XtSetValues (wmshell, al, 2); | 277 XtSetValues (wmshell, al, 2); |
280 } | 278 } |
282 void | 280 void |
283 x_wm_set_variable_size (Widget wmshell, int width, int height) | 281 x_wm_set_variable_size (Widget wmshell, int width, int height) |
284 { | 282 { |
285 Arg al [2]; | 283 Arg al [2]; |
286 | 284 |
287 if (!XtIsWMShell (wmshell)) | 285 assert (XtIsWMShell (wmshell)); |
288 ABORT (); | |
289 #ifdef DEBUG_GEOMETRY_MANAGEMENT | 286 #ifdef DEBUG_GEOMETRY_MANAGEMENT |
290 /* See comment in EmacsShell.c */ | 287 /* See comment in EmacsShell.c */ |
291 printf ("x_wm_set_variable_size: %d %d\n", width, height); | 288 printf ("x_wm_set_variable_size: %d %d\n", width, height); |
292 fflush (stdout); | 289 fflush (stdout); |
293 #endif | 290 #endif |
351 { | 348 { |
352 Display *dpy = XtDisplay (shell); | 349 Display *dpy = XtDisplay (shell); |
353 Extbyte *app_name, *app_class; | 350 Extbyte *app_name, *app_class; |
354 XClassHint classhint; | 351 XClassHint classhint; |
355 | 352 |
356 if (!XtIsWMShell (shell)) | 353 assert (XtIsWMShell (shell)); |
357 ABORT (); | |
358 | 354 |
359 XtGetApplicationNameAndClass (dpy, &app_name, &app_class); | 355 XtGetApplicationNameAndClass (dpy, &app_name, &app_class); |
360 classhint.res_name = frame_name; | 356 classhint.res_name = frame_name; |
361 classhint.res_class = app_class; | 357 classhint.res_class = app_class; |
362 XSetClassHint (dpy, XtWindow (shell), &classhint); | 358 XSetClassHint (dpy, XtWindow (shell), &classhint); |
368 x_wm_maybe_store_wm_command (struct frame *f) | 364 x_wm_maybe_store_wm_command (struct frame *f) |
369 { | 365 { |
370 Widget w = FRAME_X_SHELL_WIDGET (f); | 366 Widget w = FRAME_X_SHELL_WIDGET (f); |
371 struct device *d = XDEVICE (FRAME_DEVICE (f)); | 367 struct device *d = XDEVICE (FRAME_DEVICE (f)); |
372 | 368 |
373 if (!XtIsWMShell (w)) | 369 assert (XtIsWMShell (w)); |
374 ABORT (); | |
375 | 370 |
376 if (NILP (DEVICE_X_WM_COMMAND_FRAME (d))) | 371 if (NILP (DEVICE_X_WM_COMMAND_FRAME (d))) |
377 { | 372 { |
378 int argc; | 373 int argc; |
379 Wexttext **argv; | 374 Wexttext **argv; |
1522 } | 1517 } |
1523 #endif | 1518 #endif |
1524 | 1519 |
1525 /* OK, we're a top-level shell. */ | 1520 /* OK, we're a top-level shell. */ |
1526 | 1521 |
1527 if (!XtIsWMShell (wmshell)) | 1522 assert (XtIsWMShell (wmshell)); |
1528 ABORT (); | |
1529 | 1523 |
1530 /* If the EmacsFrame doesn't have a geometry but the shell does, | 1524 /* If the EmacsFrame doesn't have a geometry but the shell does, |
1531 treat that as the geometry of the frame. | 1525 treat that as the geometry of the frame. |
1532 (Is this bogus? I'm not sure.) */ | 1526 (Is this bogus? I'm not sure.) */ |
1533 | 1527 |