Skip to content

Commit 331af63

Browse files
committed
Fix window header disappear when dragging window in certain scenarios.
Signed-off-by: iysheng <iysheng@163.com>
1 parent 2ee903c commit 331af63

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/window.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ bool Window::mouse_drag_event(const Vector2i &, const Vector2i &rel,
167167
if (m_drag && (button & (1 << GLFW_MOUSE_BUTTON_1)) != 0) {
168168
m_pos += rel;
169169
m_pos = max(m_pos, Vector2i(0));
170-
m_pos = min(m_pos, parent()->size() - m_size);
170+
if (parent()->size().y() > m_size.y())
171+
m_pos = min(m_pos, parent()->size() - m_size);
171172
return true;
172173
}
173174
return false;

0 commit comments

Comments
 (0)