aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Rudalics2015-08-19 08:49:41 +0200
committerMartin Rudalics2015-08-19 08:49:41 +0200
commit62661fe759dfc826f31b032e49f0f15b40a207d5 (patch)
treeb738020ade36f6e41742984b9bbf333b661d751b /src
parentf814775b41ccbfc4777c5223704c44707328f404 (diff)
downloademacs-62661fe759dfc826f31b032e49f0f15b40a207d5.tar.gz
emacs-62661fe759dfc826f31b032e49f0f15b40a207d5.zip
In w32fns.c condition TITLEBAR_INFO declaration on WINDOWS version.
* src/w32fns.c (TITLEBAR_INFO): Make it a typedef so MinGW64 builds can use the declaration from the system headers. (GetTitleBarInfo_Proc, Fx_frame_geometry): Adapt to new definition of TITLEBAR_INFO. Suggested by Eli Zaretskii <eliz@gnu.org>
Diffstat (limited to 'src')
-rw-r--r--src/w32fns.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/w32fns.c b/src/w32fns.c
index 8f0bde70875..189a27c62f1 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -138,13 +138,18 @@ struct MONITOR_INFO
138 DWORD dwFlags; 138 DWORD dwFlags;
139}; 139};
140 140
141#if _WIN32_WINDOWS >= 0x0410
142#define C_CHILDREN_TITLEBAR CCHILDREN_TITLEBAR
143typedef TITLEBARINFO TITLEBAR_INFO;
144#else
141#define C_CHILDREN_TITLEBAR 5 145#define C_CHILDREN_TITLEBAR 5
142struct TITLEBAR_INFO 146typedef struct
143{ 147{
144 DWORD cbSize; 148 DWORD cbSize;
145 RECT rcTitleBar; 149 RECT rcTitleBar;
146 DWORD rgstate[C_CHILDREN_TITLEBAR+1]; 150 DWORD rgstate[C_CHILDREN_TITLEBAR+1];
147}; 151} TITLEBAR_INFO, *PTITLEBAR_INFO;
152#endif
148 153
149#ifndef CCHDEVICENAME 154#ifndef CCHDEVICENAME
150#define CCHDEVICENAME 32 155#define CCHDEVICENAME 32
@@ -181,7 +186,7 @@ typedef BOOL CALLBACK (* MonitorEnum_Proc)
181typedef BOOL (WINAPI * EnumDisplayMonitors_Proc) 186typedef BOOL (WINAPI * EnumDisplayMonitors_Proc)
182 (IN HDC hdc, IN RECT *rcClip, IN MonitorEnum_Proc fnEnum, IN LPARAM dwData); 187 (IN HDC hdc, IN RECT *rcClip, IN MonitorEnum_Proc fnEnum, IN LPARAM dwData);
183typedef BOOL (WINAPI * GetTitleBarInfo_Proc) 188typedef BOOL (WINAPI * GetTitleBarInfo_Proc)
184 (IN HWND hwnd, OUT struct TITLEBAR_INFO* info); 189 (IN HWND hwnd, OUT TITLEBAR_INFO* info);
185 190
186TrackMouseEvent_Proc track_mouse_event_fn = NULL; 191TrackMouseEvent_Proc track_mouse_event_fn = NULL;
187ImmGetCompositionString_Proc get_composition_string_fn = NULL; 192ImmGetCompositionString_Proc get_composition_string_fn = NULL;
@@ -8064,7 +8069,7 @@ and width values are in pixels.
8064 { 8069 {
8065 if (get_title_bar_info_fn) 8070 if (get_title_bar_info_fn)
8066 { 8071 {
8067 struct TITLEBAR_INFO title_bar; 8072 TITLEBAR_INFO title_bar;
8068 8073
8069 title_bar.cbSize = sizeof (title_bar); 8074 title_bar.cbSize = sizeof (title_bar);
8070 title_bar.rcTitleBar.left = title_bar.rcTitleBar.right = 0; 8075 title_bar.rcTitleBar.left = title_bar.rcTitleBar.right = 0;