[gtk+] W32: Don't crash when opacity is set for non-toplevel
- From: Руслан Ижбулатов <ruslanizhb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] W32: Don't crash when opacity is set for non-toplevel
- Date: Sat, 2 Aug 2014 14:22:46 +0000 (UTC)
commit 6dede1a0b7b718efd7d8a019064d58ffe637b495
Author: Руслан Ижбулатов <lrn1986 gmail com>
Date: Fri Jul 25 23:28:31 2014 +0000
W32: Don't crash when opacity is set for non-toplevel
X11 backend doesn't, and for good reason - main code body does not check
that the window it sets opacity for is, in fact, toplevel.
Just silently fail to do anything for non-toplevel windows.
https://bugzilla.gnome.org/show_bug.cgi?id=733769
gdk/win32/gdkwindow-win32.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c
index 3d222a8..a8c7fc0 100644
--- a/gdk/win32/gdkwindow-win32.c
+++ b/gdk/win32/gdkwindow-win32.c
@@ -3175,9 +3175,8 @@ gdk_win32_window_set_opacity (GdkWindow *window,
PFN_SetLayeredWindowAttributes setLayeredWindowAttributes = NULL;
g_return_if_fail (GDK_IS_WINDOW (window));
- g_return_if_fail (WINDOW_IS_TOPLEVEL (window));
- if (GDK_WINDOW_DESTROYED (window))
+ if (!WINDOW_IS_TOPLEVEL (window) || GDK_WINDOW_DESTROYED (window))
return;
if (opacity < 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]