Add Input::get_current_cursor_shape

[Clean up] Removed unused/unnecessary methods.

(cherry picked from commit 1bae73d7d0)
This commit is contained in:
Guilherme Felipe
2019-04-15 12:30:20 -03:00
committed by Rémi Verschelde
parent 717c492eb6
commit 8ef5052967
22 changed files with 54 additions and 63 deletions

View File

@ -2045,15 +2045,11 @@ void OS_X11::process_xevents() {
case LeaveNotify: {
if (main_loop && !mouse_mode_grab)
main_loop->notification(MainLoop::NOTIFICATION_WM_MOUSE_EXIT);
if (input)
input->set_mouse_in_window(false);
} break;
case EnterNotify: {
if (main_loop && !mouse_mode_grab)
main_loop->notification(MainLoop::NOTIFICATION_WM_MOUSE_ENTER);
if (input)
input->set_mouse_in_window(true);
} break;
case FocusIn:
minimized = false;
@ -2726,6 +2722,11 @@ void OS_X11::set_cursor_shape(CursorShape p_shape) {
current_cursor = p_shape;
}
OS::CursorShape OS_X11::get_cursor_shape() const {
return current_cursor;
}
void OS_X11::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) {
if (p_cursor.is_valid()) {
Ref<Texture> texture = p_cursor;