2 /* This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 /* ---------------------------- included header files ---------------------- */
23 #include <X11/keysym.h>
27 #include "execcontext.h"
32 #include "menuparameters.h"
33 #include "menugeometry.h"
35 /* ---------------------------- local definitions -------------------------- */
37 /* ---------------------------- local macros ------------------------------- */
39 /* ---------------------------- imports ------------------------------------ */
41 /* ---------------------------- included code files ------------------------ */
43 /* ---------------------------- local types -------------------------------- */
45 /* ---------------------------- forward declarations ----------------------- */
47 /* ---------------------------- local variables ---------------------------- */
49 /* ---------------------------- exported variables (globals) --------------- */
51 /* ---------------------------- local functions ---------------------------- */
53 /* ---------------------------- interface functions ------------------------ */
55 Bool
menu_get_geometry(
56 struct MenuRoot
*mr
, Window
*root_return
, int *x_return
, int *y_return
,
57 int *width_return
, int *height_return
, int *border_width_return
,
66 dpy
, MR_WINDOW(mr
), root_return
, x_return
, y_return
,
67 (unsigned int*)width_return
, (unsigned int*)height_return
,
68 (unsigned int*)border_width_return
,
69 (unsigned int*)depth_return
);
74 if (!MR_IS_TEAR_OFF_MENU(mr
))
78 brc
= XTranslateCoordinates(
79 dpy
, MR_WINDOW(mr
), Scr
.Root
, *x_return
, *y_return
, &root_x
,
95 Bool
menu_get_outer_geometry(
96 struct MenuRoot
*mr
, struct MenuParameters
*pmp
, Window
*root_return
,
97 int *x_return
, int *y_return
, int *width_return
, int *height_return
,
98 int *border_width_return
, int *depth_return
)
100 if (MR_IS_TEAR_OFF_MENU(mr
))
104 FW_W_FRAME(pmp
->tear_off_root_menu_window
),
105 root_return
,x_return
,y_return
,
106 (unsigned int*)width_return
,
107 (unsigned int*)height_return
,
108 (unsigned int*)border_width_return
,
109 (unsigned int*)depth_return
);
113 return menu_get_geometry(
114 mr
,root_return
,x_return
,y_return
,
115 width_return
, height_return
, border_width_return
,