Commit graph

6064 commits

Author SHA1 Message Date
thefiddler 9255fdcdb4 [Platform] Fixed OnMouseDown/Up events for secondary buttons 2014-05-13 22:53:47 +02:00
thefiddler a30af547f9 [X11] Improved CursorVisible = false behavior
We now use an XGrabPointer to confine the cursor to the window,
instead of the XWarpPointer hack. Fixes issue #28 and #36.
2014-05-13 22:31:45 +02:00
thefiddler 7e3b99c636 [X11] Fixed cursor position when CursorVisible becomes true 2014-05-13 13:23:20 +02:00
thefiddler fc718026fd [X11] Fixed Cursor when CursorVisible = false
Setting Cursor will no longer override CursorVisible.
2014-05-13 09:27:21 +02:00
thefiddler 290cc91275 Merge branch 'nulldisplay' into develop 2014-05-12 17:01:01 +02:00
thefiddler c2bd8624b5 Merge branch 'nvidiafix' into develop 2014-05-12 17:00:42 +02:00
thefiddler 50b611ec5f Merge branch 'arrayfix' into develop 2014-05-12 17:00:16 +02:00
thefiddler bb01f35de9 [Rewrite] Removed unused conditional. 2014-05-12 16:35:48 +02:00
thefiddler c0b0990687 [OpenTK] Do not crash when no monitor connected
NativeWindow now checks for a non-null device before attempting to
access its properties. Affects
https://github.com/mono/MonoGame/issues/2416
2014-05-12 16:27:39 +02:00
thefiddler 4e8786f123 [X11] Correct Glx.*.SwapInterval definitions
Improved error checking means we are no longer crashing when
SwapInterval is not available.
2014-05-12 14:50:03 +02:00
thefiddler 88905cb6aa [X11] Fixed GLX extension loading
GLX is now using the new extension loading mechanism,
and the entry point names now much the available slots.
2014-05-12 13:59:48 +02:00
thefiddler 3a94d8147f [Rewrite] Fixed 2d/3d arrays on .Net
Mono can use ldlen and ldelema on both 1d arrays (vectors) and 2d/3d
arrays. However, .Net can only use these instructions on 1d arrays -
higher rank arrays must use get_Length and Address explicitly.
2014-05-12 13:03:27 +02:00
thefiddler bd712e4775 [X11] Flush XSendEvent on exit 2014-05-12 02:20:53 +02:00
thefiddler 1cf7386748 [X11] Fixed XI2Mouse smooth scrolling
The scrolling valuator offsets are now calculated correctly, based on
the number of set bits in the valuator mask.
Additionally XI2Mouse now runs on a background thread, using blocking
XIfEvent. This should improve resonsiveness and reduce CPU usage, due
to reduced polling.
2014-05-12 02:20:53 +02:00
thefiddler bba9c8c26f [X11] Improved XI2Mouse implementation
Horizontal and vertical smooth scrolling is now supported.
Movement axes are now correctly identified. Device hotplugging
has been improved.
2014-05-12 02:20:53 +02:00
thefiddler 2b16a641f0 [Examples] Improved Mouse.GetState output 2014-05-12 02:20:53 +02:00
thefiddler 96aaef9b37 [Mac] Implemented Mouse.GetCursorState() 2014-05-12 02:20:53 +02:00
thefiddler b89c920f32 [Examples] Test Mouse.SetPosition 2014-05-12 02:20:52 +02:00
thefiddler 7eefb3e3ff [SDL] Use h-wheel events 2014-05-12 02:20:52 +02:00
thefiddler bb8dfe4304 [Input] Improve SDL2 and Windows GetCursorState 2014-05-12 02:20:52 +02:00
thefiddler f4a3cab0e0 [Input] Added Mouse.GetCursorPos() (WIP) 2014-05-12 02:20:52 +02:00
thefiddler cd7342b688 Merge pull request #114 from thefiddler/nativewindow
INativeWindow cleanup and consolidation
2014-05-12 02:20:29 +02:00
thefiddler 0e48ad30d0 [Examples] Fixed Scroll.X/Y misreporting
Scroll.X and Y are no longer swapped.
2014-05-10 01:52:06 +02:00
thefiddler d7e0373852 [Platform] Fixed keys getting stuck on focus loss
NativeWindowBase will now clear all keyboard keys when losing focus.
This prevents keys from getting stuck when refocusing the window.

[Win] Also fixed WindowState.Maximized when WindowBorder is Hidden and
the window is minimized.
2014-05-09 16:45:45 +02:00
thefiddler 4556e54405 [Win] Fixed infinite recursion 2014-05-09 16:14:13 +02:00
thefiddler fb034de00d [Graphics] Made entry points internal
Internal protected means internal *or* protected, not internal *and*
protected.
2014-05-09 15:24:12 +02:00
thefiddler c98b4ea178 [Input] Do not hook FocusedChanged
This is handled by NativeWindowBase now.
2014-05-09 15:23:39 +02:00
thefiddler 8eae337d93 [Win] Cleaned up window size/pos properties 2014-05-09 15:22:33 +02:00
thefiddler f0d0f6e53a [X11] Fixed WindowBorder and WindowState setters
After many hours of fighting with xlib, the monster is slain and
WindowBorder/WindowState changes now take effect without messing
up the window size or position on the desktop.

Phew!
2014-05-09 13:10:23 +02:00
thefiddler ab29797079 [Platform] Raise KeyUp events on focus lost
This ensures that no keys are stuck in pressed state when the user
switches away from the application window.
2014-05-09 01:50:48 +02:00
thefiddler 86146f54d5 [X11] Fixed key repeat 2014-05-09 00:26:51 +02:00
thefiddler 8195800ee7 [X11] Improved vsync support
OpenTK will now check for GLX_EXT_swap_control, GLX_MESA_swap_control
and GLX_SGI_swap_control. This allows us to control vsync on more
systems.
2014-05-09 00:13:23 +02:00
thefiddler d430b462fe [X11] Corrected size events 2014-05-08 20:58:11 +02:00
thefiddler 0c61bafbd0 Merge pull request #113 from danzel/develop
[Platform] Correct spelling in INativeWindow
2014-05-08 00:51:32 +02:00
Dave Leaver 81bf3e6f7f Correct spelling in INativeWindow 2014-05-08 10:21:27 +12:00
thefiddler bfaff0bd66 [GL] Added generic RenderbufferStorage depth-stencil formats
According to the OpenGL 4.4 specification, RenderbufferStorage accepts
both generic and sized depth-stencil formats (DepthComponent and
DepthStencil). See sections 9.2.4, 9.2.5 and 9.4.
2014-05-07 23:21:24 +02:00
thefiddler c4fa8dcc44 Merge pull request #111 from thefiddler/sdl_stack_fix
[SDL] Fixed a stack corruption issue on win32
2014-05-07 13:24:22 +02:00
thefiddler e3fd9e1374 [SDL] Avoid CursorVisible = true cursor jump 2014-05-06 09:36:30 +02:00
thefiddler a270b9328e [SDL] Report mouse in client coordinates 2014-05-06 09:31:35 +02:00
thefiddler 7e86d349d2 [Examples] Test MouseCursor in GameWindowStates 2014-05-06 09:12:08 +02:00
thefiddler b1f627893b [Mac] Fixed PointTo* calculations
On HiDPI displays, the client rectangle is using a pixel-based
coordinate system, while the screen is using a point-based coordinate
system. PointToClient/PointToScreen now correctly accounts for that.
2014-05-06 09:03:13 +02:00
thefiddler cd315a3bd6 [Platform] Forward PointToScreen to backend 2014-05-06 09:02:09 +02:00
thefiddler 637a8bee66 [Platform] More selective mouse events
We should not raise mouse events when the cursor state hasn’t changed.
2014-05-06 09:01:23 +02:00
thefiddler 3408523e27 [Examples] Added PointToClient test 2014-05-06 09:00:42 +02:00
thefiddler 52efa3b629 [SDL] Improved documentation of Event size hack 2014-05-05 15:11:01 +02:00
Stefanos A dffabcb94a [SDL] Fixed a stack corruption issue on win32 2014-05-05 12:46:48 +02:00
thefiddler 41276361fb [Mac] Report KeyDown/Up events for modifier flags 2014-05-05 09:14:14 +02:00
thefiddler 2e9ff4d8b9 [Examples] Print KeyboardState 2014-05-05 00:56:19 +02:00
thefiddler b53d4a6554 [Examples] Test key events for consistency 2014-05-05 00:43:58 +02:00
thefiddler 8b7d5bc7e4 [Input] Implement key repeat 2014-05-05 00:43:45 +02:00