Rev 9769 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9769 | Rev 9785 | ||
---|---|---|---|
Line 217... | Line 217... | ||
217 | void kos_CheckMouseMode(_THIS) |
217 | void kos_CheckMouseMode(_THIS) |
218 | { |
218 | { |
219 | if (this->input_grab == SDL_GRAB_OFF) |
219 | if (this->input_grab == SDL_GRAB_OFF) |
220 | return; |
220 | return; |
221 | ksys_thread_t thread_info; |
221 | ksys_thread_t thread_info; |
222 | int res = _ksys_thread_info(&thread_info, -1); |
222 | int top = _ksys_thread_info(&thread_info, -1); |
- | 223 | ||
223 | if (res == thread_info.window_pos_info) { |
224 | if (top == thread_info.pos_in_window_stack) { |
224 | int x = thread_info.winx_start + thread_info.clientx + this->hidden->win_size_x/2; |
225 | int x = thread_info.winx_start + thread_info.clientx + this->hidden->win_size_x/2; |
225 | int y = thread_info.winy_start + thread_info.clienty + this->hidden->win_size_y/2; |
226 | int y = thread_info.winy_start + thread_info.clienty + this->hidden->win_size_y/2; |
226 | _ksys_set_mouse_pos(x, y); |
227 | _ksys_set_mouse_pos(x, y); |
227 | } |
228 | } |
228 | } |
229 | } |
Line 266... | Line 267... | ||
266 | dev->SetCaption = kos_SetCaption; |
267 | dev->SetCaption = kos_SetCaption; |
267 | dev->SetIcon = NULL; |
268 | dev->SetIcon = NULL; |
268 | dev->IconifyWindow = NULL; |
269 | dev->IconifyWindow = NULL; |
269 | dev->GrabInput = NULL; |
270 | dev->GrabInput = NULL; |
270 | dev->GetWMInfo = NULL; |
271 | dev->GetWMInfo = NULL; |
271 | dev->InitOSKeymap = MenuetOS_InitOSKeymap; |
272 | dev->InitOSKeymap = kos_InitOSKeymap; |
272 | dev->PumpEvents = MenuetOS_PumpEvents; |
273 | dev->PumpEvents = kos_PumpEvents; |
273 | dev->free = kos_DeleteDevice; |
274 | dev->free = kos_DeleteDevice; |
274 | dev->CreateWMCursor = kos_CreateWMCursor; |
275 | dev->CreateWMCursor = kos_CreateWMCursor; |
275 | dev->FreeWMCursor = kos_FreeWMCursor; |
276 | dev->FreeWMCursor = kos_FreeWMCursor; |
276 | dev->ShowWMCursor = kos_ShowWMCursor; |
277 | dev->ShowWMCursor = kos_ShowWMCursor; |
277 | dev->CheckMouseMode = kos_CheckMouseMode; |
278 | dev->CheckMouseMode = kos_CheckMouseMode; |