mirror of https://github.com/kivy/kivy.git
core:Window: Ensure window cursor respects config. Closes #3441
This commit is contained in:
parent
47e4ff8c44
commit
616be48357
|
@ -92,6 +92,9 @@ cdef class _WindowSDL2Storage:
|
|||
SDL_GetWindowSize(self.win, &w, &h)
|
||||
return w, h
|
||||
|
||||
def show_cursor(self, value):
|
||||
SDL_ShowCursor(value)
|
||||
|
||||
def _get_gl_size(self):
|
||||
cdef int w, h
|
||||
SDL_GL_GetDrawableSize(self.win, &w, &h)
|
||||
|
|
|
@ -210,6 +210,9 @@ class WindowSDL(WindowBase):
|
|||
self._win.set_fullscreen_mode(self.fullscreen)
|
||||
|
||||
super(WindowSDL, self).create_window()
|
||||
# set mouse visibility
|
||||
self._win.show_cursor(
|
||||
Config.getboolean('graphics', 'show_cursor'))
|
||||
|
||||
if self.initialized:
|
||||
return
|
||||
|
|
|
@ -525,6 +525,7 @@ cdef extern from "SDL.h":
|
|||
cdef void SDL_SetWindowMinimumSize(SDL_Window * window, int min_w, int min_h)
|
||||
cdef void SDL_SetWindowBordered(SDL_Window * window, SDL_bool bordered)
|
||||
cdef void SDL_ShowWindow(SDL_Window * window)
|
||||
cdef int SDL_ShowCursor(int toggle)
|
||||
cdef void SDL_HideWindow(SDL_Window * window)
|
||||
cdef void SDL_RaiseWindow(SDL_Window * window)
|
||||
cdef void SDL_MaximizeWindow(SDL_Window * window)
|
||||
|
|
Loading…
Reference in New Issue