Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pirvi-public
glfw
Commits
eb7c9994
Commit
eb7c9994
authored
Jan 19, 2018
by
Emmanuel Gil Peyrot
Committed by
linkmauve
Jan 29, 2018
Browse files
Prevent auto-iconify from firing on window creation
parent
94c7aa0d
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/wl_platform.h
View file @
eb7c9994
...
...
@@ -177,6 +177,9 @@ typedef struct _GLFWwindowWayland
struct
zwp_idle_inhibitor_v1
*
idleInhibitor
;
// This is a hack to prevent auto-iconification on creation.
GLFWbool
justCreated
;
}
_GLFWwindowWayland
;
// Wayland-specific global data
...
...
src/wl_window.c
View file @
eb7c9994
...
...
@@ -338,9 +338,10 @@ static void xdgToplevelHandleConfigure(void* data,
_glfwInputWindowDamage
(
window
);
}
if
(
!
activated
&&
window
->
autoIconify
)
if
(
!
window
->
wl
.
justCreated
&&
!
activated
&&
window
->
autoIconify
)
_glfwPlatformIconifyWindow
(
window
);
_glfwInputWindowFocus
(
window
,
activated
);
window
->
wl
.
justCreated
=
GLFW_FALSE
;
}
static
void
xdgToplevelHandleClose
(
void
*
data
,
...
...
@@ -561,6 +562,7 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
const
_GLFWctxconfig
*
ctxconfig
,
const
_GLFWfbconfig
*
fbconfig
)
{
window
->
wl
.
justCreated
=
GLFW_TRUE
;
window
->
wl
.
transparent
=
fbconfig
->
transparent
;
if
(
!
createSurface
(
window
,
wndconfig
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment