Both flashing a window and setting the window opacity were using
incorrect declarations for function pointers. They were missing the
WINAPI annotation as defined in windows.h. As a result, the stack
could be corrupted when these functions were invoked.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=689235
(cherry picked from commit
5637ef1f97ee46666c97707ed7f6bae459007163)
#include "config.h"
#include <stdlib.h>
+#include <windows.h>
#include "gdk.h"
#include "gdkwindowimpl.h"
gboolean urgent)
{
FLASHWINFO flashwinfo;
- typedef BOOL (*PFN_FlashWindowEx) (FLASHWINFO*);
+ typedef BOOL (WINAPI *PFN_FlashWindowEx) (FLASHWINFO*);
PFN_FlashWindowEx flashWindowEx = NULL;
g_return_if_fail (GDK_IS_WINDOW (window));
gdouble opacity)
{
LONG exstyle;
- typedef BOOL (*PFN_SetLayeredWindowAttributes) (HWND, COLORREF, BYTE, DWORD);
+ typedef BOOL (WINAPI *PFN_SetLayeredWindowAttributes) (HWND, COLORREF, BYTE, DWORD);
PFN_SetLayeredWindowAttributes setLayeredWindowAttributes = NULL;
g_return_if_fail (GDK_IS_WINDOW (window));