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
This commit is contained in:
@ -3175,9 +3175,8 @@ gdk_win32_window_set_opacity (GdkWindow *window,
|
|||||||
PFN_SetLayeredWindowAttributes setLayeredWindowAttributes = NULL;
|
PFN_SetLayeredWindowAttributes setLayeredWindowAttributes = NULL;
|
||||||
|
|
||||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
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;
|
return;
|
||||||
|
|
||||||
if (opacity < 0)
|
if (opacity < 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user