Mercurial > emacs
annotate oldXMenu/DelPane.c @ 111512:4f757d8e8ed7
Apply XAtom revork patches from Julien Danjou.
* xsettings.c (init_xsettings): Use already fetch atoms.
* xsmfns.c (create_client_leader_window): Use SM_CLIENT_ID atom
from dpyinfo.
* xselect.c (Fx_send_client_event): Split and create
x_send_client_event.
* lisp.h: Do not EXFUN Fx_send_client_event.
* xterm.c (x_set_frame_alpha): Use _NET_WM_WINDOW_OPACITY atom
from dpyinfo.
(wm_supports): Use atoms from dpyinfo.
(do_ewmh_fullscreen): Use atoms from dpyinfo.
(x_ewmh_activate_frame): Use atoms from dpyinfo.
(xembed_set_info): Use atoms from dpyinfo.
(x_term_init): Fetch _XEMBED_INFO, _NET_SUPPORTED,
_NET_SUPPORTING_WM_CHECK, _NET_WM_WINDOW_OPACITY and
_NET_ACTIVE_WINDOW, XSETTINGS atoms.
Get all atoms in one round-trip.
(set_wm_state): Use x_send_client_event rather than
Fx_send_client_event, using Atom directly.
(x_ewmh_activate_frame): Ditto.
(x_set_sticky): Pass atoms to set_wm_state.
(do_ewmh_fullscreen): Ditto.
* xterm.h (x_display_info): Add Xatom_net_supported,
Xatom_net_supporting_wm_check, Xatom_net_active_window,
Xatom_net_wm_window_opacity, Xatom_XEMBED_INFO, SM_CLIENT_ID.
* xfns.c (Fx_show_tip): Fix typo in docstring.
author | Jan D. <jan.h.d@swipnet.se> |
---|---|
date | Fri, 12 Nov 2010 10:31:44 +0100 |
parents | 5cc91198ffb2 |
children | ef719132ddfa |
rev | line source |
---|---|
76174
fec5e03aaf59
Remove FSF copyright since file does not differ significantly from X11
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
1 /* Copyright Massachusetts Institute of Technology 1985 */ |
fec5e03aaf59
Remove FSF copyright since file does not differ significantly from X11
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
2 |
25858 | 3 #include "copyright.h" |
4 | |
5 | |
6 /* | |
7 * XMenu: MIT Project Athena, X Window system menu package | |
8 * | |
9 * XMenuDeletePane - Deletes a pane from an XMenu object. | |
10 * | |
11 * Author: Tony Della Fera, DEC | |
12 * 20-Nov-85 | |
13 * | |
14 */ | |
15 | |
16 #include "XMenuInt.h" | |
17 | |
18 int | |
109124
5cc91198ffb2
Convert function definitions in oldXMenu to standard C.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
76174
diff
changeset
|
19 XMenuDeletePane(register Display *display, register XMenu *menu, register int p_num) |
5cc91198ffb2
Convert function definitions in oldXMenu to standard C.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
76174
diff
changeset
|
20 /* Previously opened display */ |
5cc91198ffb2
Convert function definitions in oldXMenu to standard C.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
76174
diff
changeset
|
21 /* Menu object to be modified. */ |
5cc91198ffb2
Convert function definitions in oldXMenu to standard C.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
76174
diff
changeset
|
22 /* Pane number to be deleted. */ |
25858 | 23 { |
24 register XMPane *p_ptr; /* Pointer to pane being deleted. */ | |
25 register XMSelect *s_ptr; /* Pointer to selections being deleted. */ | |
26 register XMSelect *s_next; /* Pointer to next selection to be deleted. */ | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25858
diff
changeset
|
27 |
25858 | 28 /* |
29 * Find the right pane. | |
30 */ | |
31 p_ptr = _XMGetPanePtr(menu, p_num); | |
32 if (p_ptr == NULL) return(XM_FAILURE); | |
33 | |
34 /* | |
35 * Remove the pane from the association table. | |
36 */ | |
37 XDeleteAssoc(display, menu->assoc_tab, p_ptr->window); | |
38 | |
39 /* | |
40 * Remove the pane from the pane list and update | |
41 * the pane count. | |
42 */ | |
43 emacs_remque(p_ptr); | |
44 menu->p_count--; | |
45 | |
46 /* | |
47 * Remove all the selections in the pane from the | |
48 * association table and free their XMSelect structures. | |
49 */ | |
50 for ( | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25858
diff
changeset
|
51 s_ptr = p_ptr->s_list->next; |
25858 | 52 s_ptr != p_ptr->s_list; |
53 s_ptr = s_next | |
54 ) { | |
55 XDeleteAssoc(display, menu->assoc_tab, s_ptr->window); | |
56 s_next = s_ptr->next; | |
57 free(s_ptr); | |
58 } | |
59 free(p_ptr->s_list); | |
60 | |
61 if (p_ptr->window) { | |
62 /* | |
63 * Destroy the selection transparencies. | |
64 */ | |
65 XDestroySubwindows(display, p_ptr->window); | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25858
diff
changeset
|
66 |
25858 | 67 /* |
68 * Destroy the pane window. | |
69 */ | |
70 XDestroyWindow(display, p_ptr->window); | |
71 } | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25858
diff
changeset
|
72 |
25858 | 73 /* |
74 * Free the pane's XMPane structure. | |
75 */ | |
76 free(p_ptr); | |
77 | |
78 /* | |
79 * Schedule a recompute. | |
80 */ | |
81 menu->recompute = 1; | |
82 | |
83 /* | |
84 * Return the pane number just deleted. | |
85 */ | |
86 _XMErrorCode = XME_NO_ERROR; | |
87 return(p_num); | |
88 } | |
52401 | 89 |
90 /* arch-tag: 32a5bfd4-4bac-4090-bb53-844110f4908e | |
91 (do not change this comment) */ |