1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 10:48:51 -05:00
Commit Graph

1470 Commits

Author SHA1 Message Date
Camilla Berglund 3fcc2a6cb2 Documented use of deprecated OS X function. 2014-09-03 00:31:39 +02:00
Camilla Berglund f8d80a936f Internal header cleanup. 2014-09-02 19:47:29 +02:00
Camilla Berglund c85294e0b2 Window class cleanup. 2014-08-31 14:21:55 +02:00
Camilla Berglund 82dc6c8b8f Removed option to disable loading of winmm. 2014-08-31 13:51:21 +02:00
Camilla Berglund b1fd3c00d0 Removed duplicate window position clearing. 2014-08-26 14:46:02 +02:00
Camilla Berglund c700978c45 X11 library struct cleanup and comments. 2014-08-22 11:19:02 +02:00
Camilla Berglund 5d525c4a5f Moved display closing into _glfwPlatformTerminate. 2014-08-21 21:18:02 +02:00
Camilla Berglund e5d890a1aa Made clipboard string member name consistent. 2014-08-21 21:14:29 +02:00
Camilla Berglund 44c899ce70 Added support for GL_KHR_context_flush_control. 2014-08-21 19:29:04 +02:00
Camilla Berglund cfc47abf0d Made context creation backends more consistent. 2014-08-21 19:29:04 +02:00
Camilla Berglund d5cf713c20 Clarified comment on APIENTRY hack. 2014-08-21 19:29:04 +02:00
Camilla Berglund a5281df501 Moved RandR gamma probe to init. 2014-08-18 12:58:02 +02:00
Camilla Berglund 59d1aa52f2 Merged gamma files into monitor files. 2014-08-18 12:31:48 +02:00
Camilla Berglund 626dbf6057 Added clearing of global struct on terminate. 2014-08-18 12:17:00 +02:00
Camilla Berglund 8cd88ddf61 Cleanup of OS X cursor fixes.
Closes #334.
Fixes #254.
2014-08-13 09:17:14 +02:00
Arseny Kapoulkine 87fb437d76 Fixed changing cursor while it's outside window.
We need to invoke both [NSCursor set] and [NSView addCursorRect].

First call is responsible for changing the cursor if it's inside the
view; second call is responsible for keeping the cursor the same if it's
outside.
2014-08-13 09:17:14 +02:00
Arseny Kapoulkine e74ebf0be3 Fix cursor behavior on OS X.
Don't implement resetCursorRects: this occasionally hides the cursor
since an empty cursor is assigned to the window rectangle.  Implementing
this method is not required since OS displays the window cursor
correctly by default.

Don't reset cursor mode when window loses focus: once again, OS handles
this correctly, and this means that the window cursor state is restored
when window gains focus again.
2014-08-13 09:17:14 +02:00
Camilla Berglund 26f86ac50a Merge pull request #333 from ricardomv/fix-reopen
wayland: Release input focus when window is destroyed.
2014-08-13 08:59:25 +02:00
Arseny Kapoulkine b4d4fc8f79 Optimize _glfwInitJoysticks on OS X.
This function used to enumerate all devices and capture all properties
of every device into a dictionary. This takes 180 ms on a MacBook Pro
without external devices and 280 ms with an external keyboard/mouse
attached.

Since we're only interested in a few properties, we can just get them
one by one - this reduces the time to <1 ms.

Note that we still use the dictionary to get the joystick elements.
For unknown reason this is required to get all axes/buttons - without
doing this we don't get any joystick elements in addJoystickElement.

Closes #332.
2014-08-13 08:06:37 +02:00
Camilla Berglund 3b7d34a1d5 Moved XKB header to header variable. 2014-08-11 23:56:05 +02:00
Camilla Berglund aa4ec94d71 Removed link interface no-op.
Closes #327.
2014-08-11 20:30:21 +02:00
Camilla Berglund 6e0ea02f17 Quoted all CMake paths with substitution.
Fixes #258.
2014-08-11 20:26:37 +02:00
Camilla Berglund 87490316c8 Fixed video modes not being rotated to match CRTC.
Fixes #284.
2014-08-11 19:48:27 +02:00
Ricardo Vieira a7c9ca3b43 wayland: Release input focus when window is destroyed
This fixes a seg. fault on the reopen test because events might occur
after the window is destroyed (for example leave events).
2014-07-26 21:55:43 +01:00
Camilla Berglund 434d0947e5 Merge pull request #321 from ricardomv/wayland-resize
Add support for resizing windows on Wayland.
2014-07-21 14:45:23 +02:00
Ricardo Vieira acf6bfb1f6 wayland: Destroy window context before clearing the egl surface 2014-07-10 22:10:15 +01:00
Ricardo Vieira 2c5c6a1ff5 wayland: Add support for resizing windows 2014-07-10 22:07:30 +01:00
Ricardo Vieira 08dccc390d wayland: Remove unused code 2014-07-10 22:05:54 +01:00
Camilla Berglund 70fd348432 Fixed API version in header files. 2014-07-08 13:44:34 +02:00
Ricardo Vieira 704dc3e34d Fixed crash on Wayland with DRM-backend.
Fixes #319.
Fixes #301.
2014-07-01 10:41:32 +02:00
Jonas Ådahl 2230a68e42 wayland: Follow _glfwInputChar() type change 2014-06-30 09:09:33 +02:00
Camilla Berglund 896d040c68 Merge pull request #316 from jadahl/wayland-input
Wayland input work.
2014-06-29 23:44:35 +02:00
Jonas Ådahl 9ac854b7bb wayland: Add keyboard support
Adds libxkbcommon as a dependency when enabling the Wayland backend.
2014-06-29 23:21:06 +02:00
Jonas Ådahl 2f71bfc152 x11: Move KeySym to unicode converter out of x11 backend
To be used by the Wayland backend.
2014-06-29 23:18:40 +02:00
Jonas Ådahl a75cf5a163 wayland: Add basic input support 2014-06-29 23:18:40 +02:00
Jonas Ådahl 4c68049d86 wayland: Fix indentation 2014-06-29 23:18:40 +02:00
Ricardo Vieira dea861abd8 Fixed all EGLConfigs listed as single-buffered.
The commit c980858 added a new flag to _GLFWfbconfig that was not being
set by EGLConfig enumeration.  This patch assumes eglCreateWindowSurface
only creates double-buffered surfaces.

Fixes #315.
2014-06-29 23:16:28 +02:00
Doug Binks 55b5ca0bcc Fixed WGL not re-creating for sRGB hint.
Fixes #312.
2014-06-24 13:07:58 +02:00
Camilla Berglund 96b12ee504 Added character with modifiers callback.
The undefined behaviour changed with #40 has been reverted, making the
character-only callback again behave like a system text field.  This
behavior has now been documentated.

Fixes #203.
Fixes #305.
2014-06-24 10:50:05 +02:00
Camilla Berglund 9b6c14b7ae Unified X11 cursor creation. 2014-06-22 13:15:36 +02:00
Camilla Berglund 215924f797 Removed harmless CGDisplay to NSScreen error.
This used to be a failure state, but has since been fixed.

Closes #221.
2014-06-19 13:50:29 +02:00
Camilla Berglund e8e05d462c Documentation work.
Fixes #276.
2014-06-19 11:38:22 +02:00
Camilla Berglund a7b9deb2ca Fixed use of previous member name. 2014-06-18 21:07:54 +02:00
Camilla Berglund 8ac54e8b14 Formatting. 2014-06-18 18:24:42 +02:00
Camilla Berglund f3b65445dc Fixed cursor outside new full screen windows.
The cursor was not positioned over newly created full screen windows,
leading to confusing behavior like invisible cursor or window
iconification.

This fix is a stop-gap until the direct cursor position work is merged.

Fixes #111.
2014-06-18 17:13:28 +02:00
Camilla Berglund 7cb217ed4a Fixed plural forms on key/button arrays. 2014-06-18 16:39:41 +02:00
Camilla Berglund 3ce7bfef07 Added GLFW_FLOATING.
Fixes #23.
2014-06-18 16:39:39 +02:00
Camilla Berglund c9808586b3 Added GLFW_DOUBLEBUFFER. 2014-06-18 16:36:53 +02:00
Camilla Berglund 281013002d Added GLFW_DONT_CARE.
This changes the behavior of framebuffer hints set to zero.  Before,
zero meant that any value was acceptable.  This changes zero to be an
explicit preference and adds GLFW_DONT_CARE to mean that any value is
equally acceptable.

Fixes #70.
2014-06-18 16:36:22 +02:00
Camilla Berglund 25e7ff1196 Added GLFW_AUTO_ICONIFY.
By default, full screen windows that lose focus will be iconified and
the video mode will be restored.  This makes it impossible to create
applications spanning multiple monitors.  The GLFW_AUTO_ICONIFY window
hint will allow users to disable this behavior.

Fixes #143.
2014-06-18 16:33:58 +02:00
Camilla Berglund 4fb5da75dc Consume WM_ERASEBKGND. 2014-06-18 16:19:17 +02:00
Camilla Berglund 5e008ad074 Removed tautological test. 2014-06-18 16:19:17 +02:00
Camilla Berglund 7123bcfc3e Fixed modifier key events being lost. 2014-06-17 11:49:29 +02:00
Camilla Berglund 20b7ac0518 Formatting. 2014-06-12 22:08:37 +02:00
Camilla Berglund 7653f3af49 Updated comments on global variables. 2014-06-10 15:04:32 +02:00
Camilla Berglund ae469ee614 Made X11 Unicode table const. 2014-06-10 15:04:32 +02:00
Camilla Berglund c6e02c09ff Fixed leaks of joystick mutable arrays. 2014-05-29 13:19:08 +02:00
Camilla Berglund 8f2336f02c Fixed release of get rule objects.
Partial revert of b4c03b992c.

Fixes #262.
2014-05-29 11:28:22 +02:00
Camilla Berglund 04ea2112bd Fixed possible use of invalid HWND. 2014-05-23 13:24:36 +02:00
Camilla Berglund 4923f1cf7e Call platform API directly where possible. 2014-05-21 21:30:24 +02:00
Camilla Berglund 56f0bb8613 Comment fix. 2014-05-21 21:30:24 +02:00
Camilla Berglund b91116e2bc Fixed glfwShowWindow restoring maximized windows.
Fixes #264.
2014-05-19 15:01:05 +02:00
Camilla Berglund dc5c264e26 Fixed broken key repeat detection. 2014-05-19 15:01:05 +02:00
Camilla Berglund 22e1b525a5 Cleaned up shared key repeat detection. 2014-05-18 14:06:51 +02:00
Camilla Berglund d95b1b33e5 Cleanup of XKB detection code. 2014-05-18 14:06:49 +02:00
Andrew Corrigan b889aa7841 Automatically detect Xkb at run-time.
Uses XGetKeyboardMapping as a fallback.  Fixes #282.
2014-05-18 12:45:43 +02:00
Camilla Berglund e02b278db1 Linux joystick cleanup. 2014-05-16 11:27:30 +02:00
Camilla Berglund deed44a4af Fixed joystick name dangling pointer. 2014-05-16 11:25:34 +02:00
Camilla Berglund aa6f8d40bd Fixed misspelled parameter.
Fixes #287.
2014-05-04 12:19:11 +02:00
Camilla Berglund 5ea485e197 Added missing function stub. 2014-05-04 11:51:40 +02:00
Camilla Berglund cda5b25cb2 Moved to WM_NCCREATE. 2014-04-20 15:26:52 +02:00
Camilla Berglund 646c1cb8a8 Added inclusion of TLS header to Wayland. 2014-04-08 17:47:38 +02:00
Camilla Berglund 1fed6f8abd Fixed name of global TLS state macro. 2014-04-08 17:47:38 +02:00
Camilla Berglund 1127c0e6e5 Renamed Wayland files to match prefix. 2014-04-08 17:47:38 +02:00
Camilla Berglund 48619a385e Renamed joystick state members. 2014-04-08 17:47:38 +02:00
Camilla Berglund eaf3bd5ca4 Formatting. 2014-04-08 17:47:38 +02:00
Camilla Berglund 12b28c4bb9 Fixed name of global context state macro. 2014-04-08 17:47:38 +02:00
Camilla Berglund 7c925353a5 Renamed context module headers. 2014-04-08 17:47:38 +02:00
Camilla Berglund 8113c00712 Merged CMake platform file picking blocks. 2014-04-08 17:47:38 +02:00
Camilla Berglund 17d9051b82 Separated time state from window system state. 2014-04-08 17:47:38 +02:00
Camilla Berglund 7a4623e034 Added cursor stubs to Wayland backend. 2014-04-08 17:47:38 +02:00
Camilla Berglund 115c6bc000 Removed superfluous include. 2014-04-08 17:47:38 +02:00
Camilla Berglund fce0114174 Renamed POSIX time module. 2014-04-08 17:47:38 +02:00
Camilla Berglund 0e4096e201 Removed X11-specific macro from Wayland port. 2014-04-08 17:47:38 +02:00
Camilla Berglund d6243c63fe Removed tab characters. 2014-04-08 17:47:38 +02:00
Camilla Berglund 420f3f7840 Wayland error reporting work. 2014-04-08 17:47:38 +02:00
Camilla Berglund ede7a585bf Shortened Wayland platform prefix. 2014-04-08 17:47:38 +02:00
Camilla Berglund 5491bd4fd2 Formatting and cleanup. 2014-04-08 17:47:38 +02:00
Camilla Berglund 660034332d Separated joystick state from window system state.
This is partially in preparation for pending support for additional
joystick APIs like XInput, DirectInput and IOHID.
2014-04-08 16:07:21 +02:00
Camilla Berglund 22095d12f5 Made Wayland header macro structure match X11. 2014-04-08 16:07:20 +02:00
Camilla Berglund b7fc8099f1 Removed duplicate addition of POSIX time header. 2014-04-08 16:07:20 +02:00
Camilla Berglund f312b5e386 Removed unused file. 2014-04-08 16:07:20 +02:00
Jonas Ådahl 8e99996321 Introduce experimental Wayland backend
This patch introduces a new backend that enables GLFW applications to
run on Wayland. For now, only output is supported (windowed and
fullscreen). Pointer cursor management, input devices, clipboard etc are
not supported yet.

There are some concepts that can not be supported, more specifically
glfwSetWindowPos, glfwGetWindowPos and glfwSetCursorPos, as they are not
supported by Wayland.

This patch also changes the time and joystick implementations used by the
X11 backend to be shared between the Wayland backend and the X11 backend.
2014-04-08 16:07:20 +02:00
Camilla Berglund 99c98407c9 Removed flicker-inducing workaround.
Fixes #267.
2014-04-08 14:11:21 +02:00
Camilla Berglund c1ed0b2d5b Removed duplicate fallback. 2014-04-08 13:25:20 +02:00
Camilla Berglund 70c1aff94c Fixed missing dereference in b29fbc82c2. 2014-04-08 12:07:44 +02:00
Camilla Berglund b29fbc82c2 Ensure out arguments are always set. 2014-04-07 16:28:11 +02:00
Camilla Berglund 7911c9300d Nomenclature fix. 2014-04-07 13:38:54 +02:00
Camilla Berglund bbc12ade7f Added missing X command flushing. 2014-04-07 13:36:25 +02:00
Camilla Berglund 4a8f6ba58c Moved window delegate creation to createWindow. 2014-04-06 13:46:16 +02:00