|
ccb06296
|
2021-08-19T03:15:02
|
|
SDL_windowsevents.c: fix build against older SDKs.
|
|
91a55a02
|
2021-08-13T23:59:39
|
|
Relative mouse motion is delivered to the window with keyboard focus
This was the original intent (note SDL_UpdateWindowGrab() in SDL_OnWindowFocusGained() and SDL_OnWindowFocusLost()) and fixes a bug where relative motion unexpectedly stops if the task bar is covering the bottom of the game window and the mouse happens to move over it while relative mode is enabled.
Another alternative would be to confine the mouse when relative mode is enabled, but that generates mouse motion which would need to be ignored, and it's possible for the user moving the mouse to combine with the mouse moving into the confined area so you can't easily tell whether to ignore the mouse motion. See https://github.com/libsdl-org/SDL/issues/4165 for a case where this is problematic.
|
|
4d9efcb5
|
2021-08-13T11:52:25
|
|
Fixed flag test for boolean correctness
|
|
b28ed028
|
2021-08-13T11:39:41
|
|
Don't warp the mouse for relative mode when the window doesn't have focus
|
|
cb1e20b0
|
2021-08-10T17:50:17
|
|
Added KMOD_SCROLL to track the scroll lock state
Fixes https://github.com/libsdl-org/SDL/issues/4566
|
|
cb0fd05e
|
2021-08-07T22:41:54
|
|
Adding a clarifying comment in case a programmer unfamiliar with UTF-16 and UTF-32's relationship chances upon the code.
|
|
34701129
|
2021-08-07T20:51:49
|
|
Optimizing the implementation.
|
|
712e0d1f
|
2021-08-07T16:23:15
|
|
Fixing WM_CHAR event handling for Unicode characters outside the Basic Multilingual Plane.
|
|
cc4ab101
|
2021-07-28T14:37:33
|
|
windows: convert "//" comment to "/**/", add a FIXME.
Reference #4129
Reference #4177
|
|
41e1a236
|
2021-07-27T16:50:06
|
|
Correct the maximized size and position for borderless resizable windows
This fixes bug https://github.com/libsdl-org/SDL/issues/4043
|
|
3b85e3fd
|
2021-07-24T15:47:11
|
|
Fixed internal Windows key state when using Windows+Space or Windows+G shortcuts
This fixes bugs:
https://github.com/libsdl-org/SDL/issues/4369
https://github.com/libsdl-org/SDL/issues/4500
|
|
f1633127
|
2021-07-24T13:41:55
|
|
Added a window flash operation to be explicit about window flash behavior
|
|
e1c3a250
|
2021-07-24T12:11:27
|
|
Changed SDL_FlashWindow() so it doesn't take a flash count, and added the hint SDL_HINT_WINDOW_FLASH_COUNT to control behavior on Windows
|
|
7fe6dbaf
|
2021-07-11T15:25:24
|
|
Reset rawInputEnableCount when RawInput is not supported
|
|
557d0f82
|
2021-03-11T13:36:56
|
|
Commenting a false alarm in WIN_GLES_SetupWindow.
When hint SDL_HINT_OPENGL_ES_DRIVER is set to "1" (e.g. for ANGLE support), assertion due to !_this->gl_config.driver_loaded can be causes while EGL is available.
|
|
4359a47b
|
2021-04-02T12:48:16
|
|
Simplify ClipCursor behaviour when RelativeMouseMode is enabled
The implementation of clip logic for relative mode seemed to
unnecessarily limit the usable area to the middle of the window, in a
2x2 pixel region. This has the adverse side effect of moving the
operating system cursor to that location, even if it is in a valid
location in the window.
While in most scenarios this is handled correctly (by storing the
original position of the cursor in the window and restoring when leaving
relative mode), there are edge cases where this clip operation can cause
WM_MOUSEMOVE to fire at a point in time where it counts as a relative
delta from SDL's perspective.
|
|
3720e254
|
2021-04-02T12:48:02
|
|
Trim some stray whitespace
|
|
c2e8a791
|
2021-06-12T16:20:47
|
|
SDL_windowsevents: add support for multiple mice
|
|
85b51e6c
|
2021-06-05T11:46:47
|
|
Fall back to polling normally if not operating the win32 message loop
In this condition, we cannot safely wait/wake on events.
|
|
64724db0
|
2021-06-04T19:55:30
|
|
Implement bare minimum for SDL_FlashWindow
|
|
0dd7024d
|
2021-03-12T21:58:20
|
|
Modifies WaitEvent and WaitEventTimeout to actually wait instead of polling
When possible use native os functions to make a blocking call waiting for
an incoming event. Previous behavior was to continuously poll the event
queue with a small delay between each poll.
The blocking call uses a new optional video driver event,
WaitEventTimeout, if available. It is called only if an window
already shown is available. If present the window is designated
using the variable wakeup_window to receive a wakeup event if
needed.
The WaitEventTimeout function accept a timeout parameter. If
positive the call will wait for an event or return if the timeout
expired without any event. If the timeout is zero it will
implement a polling behavior. If the timeout is negative the
function will block indefinetely waiting for an event.
To let the main thread sees events sent form a different thread
a "wake-up" signal is sent to the main thread if the main thread
is in a blocking state. The wake-up event is sent to the designated
wakeup_window if present.
The wake-up event is sent only if the PushEvent call is coming
from a different thread. Before sending the wake-up event
the ID of the thread making the blocking call is saved using the
variable blocking_thread_id and it is compared to the current
thread's id to decide if the wake-up event should be sent.
Two new optional video device methods are introduced:
WaitEventTimeout
SendWakeupEvent
in addition the mutex
wakeup_lock
which is defined and initialized but only for the drivers supporting the
methods above.
If the methods are not present the system behaves as previously
performing a periodic polling of the events queue.
The blocking call is disabled if a joystick or sensor is detected
and falls back to previous behavior.
|
|
157c3f80
|
2021-05-21T09:45:08
|
|
[SDL] Minimize number of system calls when handling WM_INPUT raw input messages.
Details:
Currently doing 4 system calls per WM_INPUT message, which can cause the thread handling the message loop to be swapped out several times:
* GetProp - to get window data from the window handle
* GetRawInputData - to retrieve the raw input data
* 2 calls to GetMessageExtraInfo - to ignore synthetic mouse events generated for touchscreens
In this change:
* Replaced GetProp by iterating the list of windows maintained by SDL (with a fallback to GetProp). Note that this will affect all messages and not just WM_INPUT
* only calling GetMessageExtraInfo if a touchscreen has been detected
Fix for https://jira.valve.org/browse/CSGO-4855
@saml
|
|
227021b6
|
2021-04-30T11:25:20
|
|
SDL_windowsmessagebox.c (MessageBoxDialogProc): fix calling convention.
|
|
a0a5da5d
|
2021-04-19T07:13:38
|
|
Add SDL_SetWindowAlwaysOnTop()
|
|
89b62093
|
2021-04-01T14:17:53
|
|
Fix race condition that can lead to ENTER/LEAVE window events never firing
On windows, when toggling the state of RelativeMode rapidly, there is a
high chance that SDL_WINDOWEVENT_ENTER / SDL_WINDOWEVENT_LEAVE events
will stop firing indefinitely.
This aims to resolve that shortcoming by ensuring mouse focus state is
correctly updated via WM_MOUSELEAVE events arriving via the windows
event hook.
|
|
3dbc4cf2
|
2021-03-30T17:49:51
|
|
Fix compilation error for Windows SDK 8.1+
https://docs.microsoft.com/en-us/windows/win32/api/shellscalingapi/ne-shellscalingapi-monitor_dpi_type
|
|
a78bce9e
|
2021-01-28T20:02:01
|
|
Properly handle keys already down when the hook is installed
For keys that are already down when we install the keyboard hook, we need to
allow the WM_KEYUP/WM_SYSKEYUP message to be processed normally. This ensures
that other applications see the key up, which prevents the key from being stuck
down from the perspective of other apps when our grab is released.
|
|
6b057c67
|
2021-01-26T19:16:17
|
|
Expose separate keyboard and mouse grab support
This adds SDL_SetWindowKeyboardGrab(), SDL_GetWindowKeyboardGrab(),
SDL_SetWindowMouseGrab(), SDL_GetWindowMouseGrab(), and new
SDL_WINDOW_KEYBOARD_GRABBED flag. It also updates the test harness to exercise
this functionality and makes a minor fix to X11 that I missed in
https://hg.libsdl.org/SDL/rev/02a2d609369b
To fit in with this new support, SDL_WINDOW_INPUT_CAPTURE has been renamed to
SDL_WINDOW_MOUSE_CAPTURE with the old name remaining as an alias for backwards
compatibility with older code.
|
|
a0d3c6c6
|
2021-01-25T21:42:14
|
|
Rename SetWindowGrab() to SetWindowMouseGrab()
|
|
2793c9cf
|
2021-01-25T18:40:26
|
|
Fix grabbing Alt+Tab and Alt+Esc on Windows 7
|
|
e1f73e64
|
2021-01-23T16:22:44
|
|
Refactor keyboard grab to be managed by the video core
This gives us flexibility to add others hints to control keyboard grab behavior
without having to touch all of the backends. It also allows us to possibly
expose keyboard grab separately from mouse grab for applications that want to
manage those independently.
|
|
141f4416
|
2021-01-24T03:55:04
|
|
fix build failure due to -Werror=declaration-after-statement (bug #5500)
|
|
8c921d82
|
2021-01-22T19:40:26
|
|
Implement keyboard grab support for Windows
This is implemented via a low-level keyboard hook. Unfortunately, this is
rather invasive, but it's how Microsoft recommends that it be done [0].
We want to do as little as possible in the hook, so we only intercept a few
crucial modifier keys there, while leaving other keys to the normal event
processing flow.
We will only install this hook if SDL_HINT_GRAB_KEYBOARD=1, which is not
the default. This will reduce any compatibility concerns to just the SDL
applications that explicitly ask for this behavior.
We also remove the hook when the grab is terminated to ensure that we're
not unnecessarily staying involved in key event processing when it's not
required anymore.
[0]: https://docs.microsoft.com/en-us/windows/win32/dxtecharts/disabling-shortcut-keys-in-games
|
|
76295cec
|
2021-01-05T15:50:10
|
|
video/windows: ANSI/UNICODE updates (cf. bug 5435):
- explicitly use UNICODE versions of DrawText, EnumDisplaySettings,
EnumDisplayDevices, and CreateDC: the underlying structures have
WCHAR strings.
- change WIN_UpdateDisplayMode and WIN_GetDisplayMode() to accept
LPCWSTR instead of LPCTSTR for the same reason.
- change WIN_StringToUTF8 and WIN_UTF8ToString to the explicit 'W'
versions where appropriate.
|
|
31751bdc
|
2021-01-05T15:15:37
|
|
wmmsg.h: constified wmtab
|
|
390fd14f
|
2021-01-04T01:23:50
|
|
SDL_windowswindow.c (SDL_HelperWindowCreate): adjust for ANSI/UNICODE:
change SDL_HelperWindowClassName and SDL_HelperWindowName from WCHAR *
to be const TCHAR*
cf. bug #5435.
|
|
01a2f276
|
2021-01-04T01:23:50
|
|
consistently use TEXT() macro with LoadLibrary() and GetModuleHandle()
cf. bug #5435.
|
|
6cbd4417
|
2021-01-02T14:45:15
|
|
Add a hint for D3D9Ex to avoid having to choose at compile-time
|
|
9130f7c3
|
2021-01-02T10:25:38
|
|
Updated copyright for 2021
|
|
10625f9d
|
2020-12-17T23:50:00
|
|
SDL_windowsmessagebox.c: go back to hg rev 14458 state.
encountering a NULL caption in AddDialogString() is intended, i.e.
AddDialogStaticIcon() sends it as NULL on purpose.
|
|
4d6eb305
|
2020-12-17T23:28:20
|
|
SDL_windowsmessagebox.c (AddDialogControl): add back NULL caption check.
because AddDialogStaticIcon() sends a NULL caption -- fixes bug #5401.
|
|
5c212cb0
|
2020-12-10T12:24:24
|
|
remove a few stale NULL message/title checks after commit e2b729b1756a
top-level guarantees non-NULL message / title passed in messageboxdata
|
|
f1cab8ae
|
2020-12-10T11:20:56
|
|
fix bug #5253: handle NULL title or message fields in SDL_MessageBoxData
- SDL_video.c (SDL_ShowMessageBox): replace messageboxdata, set title
or message field to "" if either of them is NULL.
- SDL_video.c (SDL_ShowSimpleMessageBox): set title or message to ""
if either of them is NULL for EMSCRIPTEN builds.
- SDL_bmessagebox.cc: add empty string check along with NULL check for
title and message fields.
- SDL_windowsmessagebox.c (AddDialogString): remove NULL string check
- SDL_windowsmessagebox.c (AddDialogControl): add empty string check
along with the NULL check.
- SDL_x11messagebox.c: revert commit 677c4cd68069
- SDL_os2messagebox.c: revert commit 2c2a489d76e7
- test/testmessage.c: Add NULL title and NULL message tests.
|
|
cb361896
|
2020-12-09T07:16:22
|
|
Fixed bug 5235 - All internal sources should include SDL_assert.h
Ryan C. Gordon
We should really stick this in SDL_internal.h or something so it's always available.
|
|
50203d58
|
2020-12-08T22:00:06
|
|
Fixed bug 5329 - SDL_SetWindowGrab(SDL_FALSE) fails to unlock cursor if window is partially offscreen
Ivan Mogilko
With SDL 2.0.12 under MS Windows, if the window is partially offscreen calling SDL_SetWindowGrab(w, SDL_TRUE) works, but subsequent call to SDL_SetWindowGrab(w, SDL_FALSE) does not work.
I tested this in both real program, and a small test app, where unlocking cursor worked perfectly while window is fully in desktop bounds, but did not work if it was at least few pixels outside.
For the reference, following code is enough to reproduce the issue:
#include <windows.h>
#include <SDL.h>
int WinMain(
HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nShowCmd)
{
SDL_Init(SDL_INIT_VIDEO);
SDL_Window* w = SDL_CreateWindow("", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 640, 400, 0);
bool grabbed = false;
bool want_quit = false;
while (!want_quit)
{
SDL_Event event;
while (SDL_PollEvent(&event))
{
switch (event.type)
{
case SDL_QUIT: want_quit = true; break;
case SDL_KEYDOWN:
if (event.key.keysym.scancode == SDL_SCANCODE_SPACE)
{
SDL_SetWindowGrab(w, static_cast<SDL_bool>(!grabbed));
grabbed = !grabbed;
}
}
}
}
SDL_DestroyWindow(w);
SDL_Quit();
return 0;
}
|
|
a0c5bfa3
|
2020-11-27T13:08:40
|
|
Moved raw input event processing from the main thread to the joystick thread
This allows fast joystick event delivery regardless of what the main thread is doing.
|
|
53b16679
|
2020-11-11T12:33:55
|
|
SIZE_MAX need not be defined in limits.h
it can be in limits.h (windows) or stdint.h.
|
|
b9cbea35
|
2020-10-13T21:08:20
|
|
video: Refresh Windows display list on WM_DISPLAYCHANGE
- Displays may have been added, removed or changed and all cached monitor
handles are invalidated as a result.
- Display events are handled in three steps:
1. Mark all currently know displays as invalid
2. Enumerate all displays, adding new ones and marking known displays as valid
3. Remove all displays still invalid after enumeration
- Display connect/disconnect events are sent when displays are added or removed
after initial setup
|
|
76980e30
|
2020-10-08T16:42:20
|
|
Added events for dynamically connecting and disconnecting displays, with an iOS implementation
|
|
771732ed
|
2020-08-27T17:54:52
|
|
windows: Fix numpad arrow key scancodes with numlock off
We should only perform the VK_LEFT, VK_UP, etc. mapping if none of the other
special mappings apply. This allows the scancode normalization for the number
pad to take place as intended.
|
|
72379ba5
|
2020-08-25T21:22:00
|
|
windows: Fix handling of swapped mouse buttons
GetAsyncKeyState() and GetRawInputData() report the state of the physical
buttons without applying the user's primary/secondary mouse button swap
preference. Swap the buttons returned from these functions, so we expose a
consistent view of the buttons to SDL callers. This new behavior also matches
the behavior of macOS and X11 backends.
See the Remarks section of the GetAsyncKeyState() function on MSDN.
|
|
b5affd12
|
2020-07-16T13:28:59
|
|
Patched to compile.
|
|
8babda2c
|
2020-07-16T13:18:19
|
|
egl: SDL_EGL_LoadLibaryOnly() shouldn't set _this->gl_config.driver_loaded = 1
This is handled in in the higher-level SDL_GL_LoadLibrary().
All uses of SDL_EGL_LoadLibrary (which calls the Only version) are just
target-specific wrappers for their own GL_LoadLibrary hook, with two
exceptions which now handle driver_loaded correctly (although it's
questionable if these init-if-no-one-did-it-correctly-already code blocks
should exist at all, fwiw).
Fixes Bugzilla #5190.
|
|
052a1373
|
2020-07-12T19:11:15
|
|
Merge VideoBootStrap::available into VideoBootStrap::create
The two are only ever called together, and combining them makes it possible
to eliminate redundant symbol loading and redundant attempts to connect
to a display server.
|
|
44f50c64
|
2020-06-09T21:47:41
|
|
Fixed bug 5171 - PollEvent impacts performance in 2.0.12
On some systems, GetClipCursor() impacts performance when called frequently, so only call it every once in a while to make sure we haven't lost our capture.
|
|
511a9702
|
2020-06-09T21:43:00
|
|
Fixed whitespace
|
|
9325b22e
|
2020-05-29T21:26:32
|
|
Fixed bug 5113 - SDL_UpdateWindowSurfaceRects BitBlt the entire surface on Win32
Ryan C. Gordon
As discussed here:
https://discourse.libsdl.org/t/question-about-implementation-of-sdl-updatewindowsurfacerects/27561
"As you can see this function [WIN_UpdateWindowFramebuffer, in src/video/windows/SDL_windowsframebuffer.c] calls BitBlt on entire screen, even though it accepts the rects. Rects variable is not even used in this function at all. Now my question is why is that the case?"
|
|
b6afbe63
|
2020-04-07T09:38:57
|
|
Added SDL_log.h to SDL_internal.h so logging is available everywhere
|
|
488b94cb
|
2020-04-07T09:18:19
|
|
Don't interpret raw input messages with no mouse position
This happens occasionally on touch devices when raw input is enabled
|
|
0721931f
|
2020-04-06T19:21:56
|
|
Avoid sending regular mouse messages for touch input
|
|
4dea340c
|
2020-03-16T12:23:38
|
|
Fixed bug 4477 - Support more than 4 XInput-capable devices on Windows
Jimb Esser
Add new RawInput controller API, and improved correlation with XInput/WGI
Reorder joystick init so drivers can ask the others if they handle a device reliably
Do not poll disconnected XInput devices (major perf issue)
Fix various cases where incorrect correlation could happen
Simple mechanism for propagating unhandled Guide button presses even before guaranteed correlation
Correlate by axis motion as well as button presses
Fix failing to zero other trigger
Fix SDL_HINT_JOYSTICK_HIDAPI not working if set before calling SDL_Init()
Add missing device to device names
Disable RawInput if we have a mismatch of XInput-capable but not RawInput-capable devices
Updated to SDL 2.0.13 code with the following notes:
New HID driver: xbox360w - no idea what that is, hopefully urelated
SDL_hidapijoystick.c had been refactored to couple data handling logic with device opening logic and device lists caused some problems, yields slightly uglier integration than previously when the 360 HID device driver was just handling the data.
SDL_hidapijoystick.c now often pulls the device off of the joystick_hwdata structure for some rumble logic, but it appears that code path is never reached, so probably not a problem.
Looks like joystick_hwdata was refactored to not include a mutex in other drivers, maintainers may want to do the same refactor here if that's useful for some reason.
Something changed in how devices get names, so getting generic names.
Had to fix a (new?) bug where removing an XInput controller caused existing controllers (that moved to a new XInput index) to get identified as 0x045e/0x02fd ("it's probably Bluetooth" in code), rendering the existing HIDAPI_IsDevicePresent and new RAWINPUT_IsDevicePresent unreliable.
|
|
e261bd42
|
2020-02-12T12:26:27
|
|
Improved fix for bug 4748 - Calling WIN_UpdateClipCursor() / WIN_UpdateClipCursorForWindows() on WIN_PumpEvents() causes beeping and choppy mouse cursor movement, right-click doesn't work
|
|
6fe6946a
|
2020-02-11T21:19:05
|
|
Fixed relative mode mouse events stopping if you click on the title bar
|
|
c31727c7
|
2020-02-11T10:08:22
|
|
Fixed bug 4748 - Calling WIN_UpdateClipCursor() / WIN_UpdateClipCursorForWindows() on WIN_PumpEvents() causes beeping and choppy mouse cursor movement, right-click doesn't work
The problem here was calling ClipCursor() continuously in a tight loop. Fixed by only calling ClipCursor() if the clip area needs to be updated.
|
|
668276fe
|
2020-02-11T09:41:55
|
|
Don't add a frame to borderless windows.
It was done to allow hotkey resizing of borderless windows, but Windows will sometimes draw it, regardless of our WM_* message handling. See bug 4466 for more details.
|
|
f867cebb
|
2020-02-11T08:36:13
|
|
Fixed bug 4709 - incorrect (not) handling of windows on-screen cursor keys
Alex Denisov
When using Win10 on-screen keyboard (tooltip.exe), the left and right cursor keys in it do not produce SDLK_LEFT and SDLK_RIGHT events.
Windows messages generated by the on-screen keyboard, for some reason, have their scancodes set to zeroes. Here is the log from Spy++:
WM_KEYDOWN nVirtKey:VK_LEFT cRepeat:1 ScanCode:00 fExtended:0 fAltDown:0 fRepeat:0 fUp:0
WM_KEYUP nVirtKey:VK_LEFT cRepeat:1 ScanCode:00 fExtended:0 fAltDown:0 fRepeat:1 fUp:1
Regular physical keyboard produces VK_LEFT (ScanCode:4B) and VK_RIGHT (ScanCode:4D) which are interpreted correctly.
With on-screen keyboard, the switch statement in VKeytoScancode() does not check for VK_LEFT and VK_RIGHT, returning SDL_SCANCODE_UNKNOWN, which in turn does not get mapped to anything (because the scan codes are zeroes).
|
|
a8780c6a
|
2020-01-16T20:49:25
|
|
Updated copyright date for 2020
|
|
c9d0e2ae
|
2019-10-23T09:26:27
|
|
Fixed bug 4840 - Read of uninitialized memory in DXGI_LoadDLL (Thanks!)
|
|
d5d34de4
|
2019-10-23T09:17:53
|
|
Fixed bug 4839 - Read of uninitialized memory in Win32_ResizeWindowShape
(Thanks!)
|
|
758badff
|
2019-10-23T08:58:52
|
|
Fixed bug 4841 - Misplaced parenthesis WIN_WindowProc / WM_ACTIVATE / ClipCursor
(Thanks!)
|
|
8a394209
|
2019-09-05T20:47:20
|
|
SDL_windowsevents.c: remove isVistaOrNewer (not used since 8cb1dc50bb28)
|
|
bf2f4703
|
2019-09-05T10:49:53
|
|
SDL_windowsmessagebox.c: remove unused variable
|
|
cc64b369
|
2019-08-30T15:32:15
|
|
Allow mouse messages from Wacom pens, e.g. right click pen buttons, etc.
|
|
afb9ff95
|
2019-08-30T08:03:19
|
|
Fixed bug where the Steam overlay would generate an event and stop input processing for the frame.
|
|
13c4d5e7
|
2019-08-26T17:43:01
|
|
Fixed Windows relative mouse coordinates when capturing the mouse over RDP
|
|
63197c43
|
2019-08-02T17:19:50
|
|
Fix bug where the wrong button was the default in the old message box because buttons were added backwards, breaking the indexing used by GetButtonIndex.
Add messagebox flags to explicilty request left-to-right button order or right-to-left. If neither is specified it'll be some platform default.
|
|
d5ec735a
|
2019-08-01T18:22:12
|
|
Add a windowID field to SDL_TouchFingerEvent (bug #4331).
This is unimplemented on some platforms and will cause compile errors when building those platform backends for now.
|
|
c37c6cbb
|
2019-07-31T23:37:02
|
|
use WIN_IsWindowsVistaOrGreater() from core/windows for isVistaOrNewer
|
|
4953e050
|
2019-07-31T05:11:40
|
|
use SDL_zeroa at more places where the argument is an array.
|
|
e7c2cf10
|
2019-07-15T09:36:53
|
|
Fixed bug 4704 - SDL_HINT_ANDROID_SEPERATE_MOUSE_AND_TOUCH on Windows?
superfury
I notice that, somehow, when locking the mouse into place(using SDL_SetRelativeMouseMode), somehow at least the movement information gets through to both mouse movement and touch movement events?
My app handles both, so when moving a touched finger accross the app(using RDP from an Android device) I see the mouse moving inside the app when it shouldn't(meaning that the touch movement is ignored properly by the app(press-location dependant) but the mouse movement is still performed due to the mouse movement events)?
|
|
7e09718d
|
2019-07-07T11:23:16
|
|
Ignore synthetic mouse events generated for touchscreens
Windows generates fake raw mouse events for touchscreens for compatibility
with legacy apps that predate touch support in Windows. We already handle
touch events explicitly, so drop the synthetic events to avoid duplicates.
|
|
0beadea5
|
2019-06-26T01:29:01
|
|
windows: Call GetWindowText() with the correct parameters (thanks, Zebediah!)
GetWindowText() wants you to tell it the size of the buffer--including the
terminating NULL char--but we weren't counting that last char, losing the
last char of the string in the process. This was only seen with the special
case of SDL_CreateWindowFrom() to use an existing native window, not
the usual SDL_CreateWindow() codepath.
Fixes Bugzilla #4696.
|
|
399df540
|
2019-06-11T01:14:24
|
|
windows: Drop WM_ACTIVATE when window is hidden, but only if being activated.
Fixes Bugzilla #4571.
|
|
f2c8d8e9
|
2019-06-08T10:47:43
|
|
Fixed bug 4443 - Incorrect scan code reported for numpad 5
bplu4t2f
When num lock is on, the scancode reported for numpad 5 is SDL_SCANCODE_KP_5, which is correct. However, when num lock is off, windows reports the VK_CLEAR virtual key code, which is incorrectly translated into SDL_SCANCODE_CLEAR inside of the VKeytoScancode(WPARAM vkey) function.
|
|
b45abbb2
|
2019-04-02T17:57:27
|
|
Bug 4576: fix warning and compile
|
|
1a4c3b57
|
2019-04-02T16:58:11
|
|
Bug 4576: remove touch/mouse duplication for Windows
|
|
5e13087b
|
2019-01-04T22:01:14
|
|
Updated copyright for 2019
|
|
5029d50e
|
2018-11-10T16:15:48
|
|
Add SDL_TouchDeviceType enum and SDL_GetTouchDeviceType(SDL_TouchID id).
Touch device types include SDL_TOUCH_DEVICE_DIRECT (a touch screen with window-relative coordinates for touches), SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE (a trackpad-style device with absolute device coordinates), and SDL_TOUCH_DEVICE_INDIRECT_RELATIVE (a trackpad-style device with screen cursor-relative coordinates).
Phone screens are an example of a direct device type. Mac trackpads are the indirect-absolute touch device type. The Apple TV remote is an indirect-relative touch device type.
|
|
4659e738
|
2018-11-01T12:31:45
|
|
merge fallout: Patched to compile, fixed some compiler warnings, etc.
|
|
62494a2e
|
2018-10-31T15:03:41
|
|
Merge SDL-ryan-batching-renderer branch to default.
|
|
b262b0eb
|
2018-10-22T20:50:32
|
|
Small stack allocations fall back to malloc if they're unexpectedly large.
|
|
eff5f650
|
2018-10-09T23:01:43
|
|
Implement SuspendScreenSaver for Win32
Creating a full-screen SDL renderer on Windows will keep the screensaver
suspended by DirectX, as is default for full-screen DX applications. However,
for applications that render in windowed-mode, the screensaver will
still kick in, even if SDL_DisableScreenSaver() is called or
SDL_HINT_VIDEO_ALLOW_SCREENSAVER is set to 0 (default). Implementing
a SuspendScreenSaver() function for Win32 fixes this behavior.
|
|
55b24b93
|
2018-09-26T11:17:43
|
|
Fixed bug 4265 - SDL window falls to the bottom of the screen when dragged down and stuck there
Alexei
On WM_WINDOWPOSCHANGED event, WIN_UpdateClipCursor() is called. SDL_WINDOW_INPUT_FOCUS is set even when the mouse pointer is not inside the SDL window and therefore ClipCursor(&rect) is called. When dragging the window and rect.bottom=800 (i.e. the bottom edge of the screen) the SDL window is clipped to the bottom of the screen and it is not possible to move it back to the center of the screen.
|
|
5febdfce
|
2018-09-24T11:49:25
|
|
Fixed whitespace
|
|
6b3e8931
|
2018-09-14T19:26:26
|
|
Added hints SDL_HINT_MOUSE_DOUBLE_CLICK_TIME and SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS to allow tuning double-click sensitivity.
Also increased the default double-click radius to 32 pixels to be more forgiving for touch interfaces
|
|
a1ca8441
|
2018-08-26T20:37:23
|
|
Update the cursor clipping each frame, in case it was stolen by another application.
|
|
15b3794f
|
2018-08-26T10:34:23
|
|
Only reset the clip rect if it's currently the rect we previously clipped.
This prevents us from clearing the clip rect globally when another application has set it.
There's also an experimental change to regularly update the clip rect for a window defensively, in case someone else has reset it. It works well, but I don't know if it's cheap enough to call as frequently as it would be called now, and might have other undesirable side effects.
Also fixed whitespace and SDL coding style
|
|
e061a92d
|
2018-08-02T16:03:47
|
|
Some drag'and'drop improvements.
First: disable d'n'd events by default; most apps don't need these at all, and
if an app doesn't explicitly handle these, each drop on the window will cause
a memory leak if the events are enabled. This follows the guidelines we have
for SDL_TEXTINPUT events already.
Second: when events are enabled or disabled, signal the video layer, as it
might be able to inform the OS, causing UI changes or optimizations (for
example, dropping a file icon on a Cocoa app that isn't accepting drops will
cause macOS to show a rejection animation instead of the drop operation just
vanishing into the ether, X11 might show a different cursor when dragging
onto an accepting window, etc).
Third: fill in the drop event details in the test library and enable the
events in testwm.c for making sure this all works as expected.
|
|
862aa4b4
|
2018-07-22T19:28:27
|
|
windows: Fixed some Visual Studio warnings about shadowed variables.
Fixes Bugzilla #4118.
|
|
013b146d
|
2018-06-30T20:55:51
|
|
SDL_windowstaskdialog.h (struct _TASKDIALOGCONFIG): make unions anonymous
otherwise build fails. (at least with my VS2005. and the code accesses the
arms of the unions anonymously anyway.)
|