mirror of
https://github.com/godotengine/godot.git
synced 2024-10-23 13:41:43 +00:00
Avoid warnings about cursor shape change not supported
This commit is contained in:
parent
b9919fd87d
commit
910efbff03
|
@ -1875,7 +1875,9 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DisplayServer::get_singleton()->cursor_set_shape(ds_cursor_shape);
|
if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_CURSOR_SHAPE)) {
|
||||||
|
DisplayServer::get_singleton()->cursor_set_shape(ds_cursor_shape);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ref<InputEventScreenTouch> touch_event = p_event;
|
Ref<InputEventScreenTouch> touch_event = p_event;
|
||||||
|
@ -2684,7 +2686,9 @@ bool Viewport::_sub_windows_forward_input(const Ref<InputEvent> &p_event) {
|
||||||
DisplayServer::CURSOR_FDIAGSIZE
|
DisplayServer::CURSOR_FDIAGSIZE
|
||||||
};
|
};
|
||||||
|
|
||||||
DisplayServer::get_singleton()->cursor_set_shape(shapes[resize]);
|
if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_CURSOR_SHAPE)) {
|
||||||
|
DisplayServer::get_singleton()->cursor_set_shape(shapes[resize]);
|
||||||
|
}
|
||||||
|
|
||||||
return true; // Reserved for showing the resize cursor.
|
return true; // Reserved for showing the resize cursor.
|
||||||
}
|
}
|
||||||
|
|
|
@ -349,7 +349,9 @@ void Window::_event_callback(DisplayServer::WindowEvent p_event) {
|
||||||
_propagate_window_notification(this, NOTIFICATION_WM_MOUSE_ENTER);
|
_propagate_window_notification(this, NOTIFICATION_WM_MOUSE_ENTER);
|
||||||
emit_signal(SNAME("mouse_entered"));
|
emit_signal(SNAME("mouse_entered"));
|
||||||
notification(NOTIFICATION_VP_MOUSE_ENTER);
|
notification(NOTIFICATION_VP_MOUSE_ENTER);
|
||||||
DisplayServer::get_singleton()->cursor_set_shape(DisplayServer::CURSOR_ARROW); //restore cursor shape
|
if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_CURSOR_SHAPE)) {
|
||||||
|
DisplayServer::get_singleton()->cursor_set_shape(DisplayServer::CURSOR_ARROW); //restore cursor shape
|
||||||
|
}
|
||||||
} break;
|
} break;
|
||||||
case DisplayServer::WINDOW_EVENT_MOUSE_EXIT: {
|
case DisplayServer::WINDOW_EVENT_MOUSE_EXIT: {
|
||||||
notification(NOTIFICATION_VP_MOUSE_EXIT);
|
notification(NOTIFICATION_VP_MOUSE_EXIT);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user