Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated method Window::move_to_foreground() #95995

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Remove deprecated method Window::move_to_foreground()
  • Loading branch information
Chubercik committed Aug 23, 2024
commit 920844566dca7a2d8ea51213882ca07145f62a50
6 changes: 0 additions & 6 deletions doc/classes/Window.xml
Original file line number Diff line number Diff line change
Expand Up @@ -359,12 +359,6 @@
Centers a native window on the current screen and an embedded window on its embedder [Viewport].
</description>
</method>
<method name="move_to_foreground" deprecated="Use [method Window.grab_focus] instead.">
<return type="void" />
<description>
Causes the window to grab focus, allowing it to receive user input.
</description>
</method>
<method name="popup">
<return type="void" />
<param index="0" name="rect" type="Rect2i" default="Rect2i(0, 0, 0, 0)" />
Expand Down
11 changes: 0 additions & 11 deletions scene/main/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -554,13 +554,6 @@ void Window::request_attention() {
}
}

#ifndef DISABLE_DEPRECATED
void Window::move_to_foreground() {
WARN_DEPRECATED_MSG(R"*(The "move_to_foreground()" method is deprecated, use "grab_focus()" instead.)*");
grab_focus();
}
#endif // DISABLE_DEPRECATED

bool Window::can_draw() const {
ERR_READ_THREAD_GUARD_V(false);
if (!is_inside_tree()) {
Expand Down Expand Up @@ -2838,10 +2831,6 @@ void Window::_bind_methods() {

ClassDB::bind_method(D_METHOD("request_attention"), &Window::request_attention);

#ifndef DISABLE_DEPRECATED
ClassDB::bind_method(D_METHOD("move_to_foreground"), &Window::move_to_foreground);
#endif // DISABLE_DEPRECATED

ClassDB::bind_method(D_METHOD("set_visible", "visible"), &Window::set_visible);
ClassDB::bind_method(D_METHOD("is_visible"), &Window::is_visible);

Expand Down
3 changes: 0 additions & 3 deletions scene/main/window.h
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,6 @@ class Window : public Viewport {
bool is_maximize_allowed() const;

void request_attention();
#ifndef DISABLE_DEPRECATED
void move_to_foreground();
#endif // DISABLE_DEPRECATED

virtual void set_visible(bool p_visible);
bool is_visible() const;
Expand Down
Loading