Commit Graph

2055 Commits

Author SHA1 Message Date
Camilla Berglund
f17d60da64 Add scancode arrays for Wayland and Mir
Related to #830.
2016-09-07 16:33:41 +02:00
Camilla Berglund
afb6e485b7 X11: Make selection event checks include window 2016-09-07 16:33:41 +02:00
Camilla Berglund
ccfd6dde45 X11: Make clipboard IPC use helper window 2016-09-07 16:33:41 +02:00
Camilla Berglund
706868dad8 X11: Make glfwPostEmptyEvent use helper window 2016-09-07 16:33:41 +02:00
Camilla Berglund
3b3a1390ad X11: Add IPC helper window 2016-09-07 16:33:41 +02:00
Camilla Berglund
fafe1732b5 Cleanup 2016-09-07 16:33:41 +02:00
Camilla Berglund
5ff7d9505f Simplify Vulkan extension checks
Related to #478.
2016-09-07 16:31:18 +02:00
Camilla Berglund
9cd0c101f0 Fix glfwMaximizeWindow not checking window mode 2016-08-21 17:43:40 +02:00
Camilla Berglund
53fafad915 Start 3.3 2016-08-18 23:55:49 +02:00
Camilla Berglund
4aafdea5a7 X11: Fix glfw*WindowPos operating on window frame
Fixes #800.
2016-08-17 01:45:41 +02:00
Camilla Berglund
c18d3aecbc Cocoa: Remove duplicate includes
Fixes #838.
2016-08-17 01:39:47 +02:00
Camilla Berglund
f1c536fe13 X11: Fix BadMatch on XSetInputFocus
Input focus was in some cases set before the window was visible (ICCCM
section 4.2.2).

Related to #798.
Fixes #789.
2016-08-12 14:01:03 +02:00
Camilla Berglund
ad9233e620 X11: Clean up event wait timeout logic
Simplify interface and implement timeout updating.
2016-08-12 13:33:21 +02:00
Camilla Berglund
f88a609000 X11: Only unmaximize visible windows 2016-08-12 13:33:21 +02:00
Camilla Berglund
b581799c9a Fix comment 2016-08-12 01:46:21 +02:00
Camilla Berglund
067d1d6935 Cleanup 2016-08-12 01:46:21 +02:00
Camilla Berglund
ada1fdc14d Formatting 2016-08-12 01:46:21 +02:00
Patrick Snape
74ed35792f Cocoa: Add missing call to removeObserver:
As noted in the documentation for NSDistributedNotificationCenter,
(under the Discussion heading) before an observer is deallocated a call
should be made to removeObserver: in order to ensure that the listener
is correctly removed from all observation pools.

Fixes #817.
Closes #826.
2016-08-08 16:57:24 +02:00
Camilla Berglund
25914d381a Fix glfwVulkanSupported emitting errors
Regression caused by 614debd13f.
2016-08-05 11:50:05 +02:00
Camilla Berglund
fcdef1d0a0 Fix potential context resource leaks
There is a gap between the creation of the context and the call to
_glfwRefreshContextAttribs.
2016-08-05 11:23:05 +02:00
Camilla Berglund
1d3240ff9c Fix Vulkan header macro not breaking compilation
Fixes #823.
2016-08-05 01:32:23 +02:00
Camilla Berglund
7c3706763a Cleanup
Cleanup of 8bdb105897.

Add build macro to configuration header and documentation.  Add
corresponding CMake option.  Add change log entry and credit.  Add
loader static library to link dependencies and add detection to
FindVulkan.cmake.
2016-08-05 01:00:08 +02:00
Philip Rideout
8bdb105897 Add _GLFW_VULKAN_STATIC build macro
This allows clients to link GLFW with a staticly-built loader library.
This is useful in hermetic build systems that build the Khronos loader
from source, rather than depending on the LunarG SDK binaries.

Closes #820.
2016-08-04 18:24:41 +02:00
Camilla Berglund
e77a76a284 Cleanup 2016-08-04 13:19:22 +02:00
Camilla Berglund
52e47b5a53 Formatting 2016-08-02 15:39:01 +02:00
Camilla Berglund
7be62631ae Cleanup 2016-08-01 23:13:11 +02:00
Camilla Berglund
d2686c8413 Fix comment 2016-08-01 23:13:11 +02:00
Camilla Berglund
cba652e4f3 Cleanup 2016-08-01 23:13:11 +02:00
Camilla Berglund
370cd14b46 Comment work 2016-08-01 23:13:11 +02:00
Camilla Berglund
06a6629eef EGL: Fix missing include 2016-08-01 23:13:11 +02:00
Camilla Berglund
a19490c291 Cleanup
Cleanup of a42d27011b3ef1e6229a1b83aaa075727a5521f3.
2016-08-01 23:13:11 +02:00
Keringar
d4eb88b255 X11: Fix application of window size limits
Closes #805.
2016-08-01 23:12:05 +02:00
Camilla Berglund
c844fea9df Improve client API error messages
Add separate strings for each client API to make it easier to grep.
Remove 'client' from fallback error messages as API-related error tokens
are used for non-client APIs as well.
2016-08-01 20:49:22 +02:00
Camilla Berglund
923568a279 Add support for WGL_ARB_create_context errors 2016-08-01 20:46:59 +02:00
Camilla Berglund
2c32503b10 Fix comment 2016-08-01 12:15:08 +02:00
Camilla Berglund
751be1ae8c Fix comment 2016-07-31 19:26:57 +02:00
Camilla Berglund
f48b63de38 Fix Valgrind false-positive
Fixes #818.
2016-07-31 17:54:30 +02:00
Camilla Berglund
d43b743ff4 Fix GCC warnings 2016-07-21 00:15:55 +02:00
Camilla Berglund
6431c26e8b Add EGL library missing error 2016-07-20 15:39:38 +02:00
Camilla Berglund
04d05fbdc2 Formatting 2016-07-20 15:19:02 +02:00
Camilla Berglund
614debd13f Initialize Vulkan API on demand 2016-07-20 15:18:42 +02:00
Camilla Berglund
2060de5ed0 Match presence of lib prefix on EGL/GLES binaries 2016-07-20 13:11:08 +02:00
Camilla Berglund
d5e00e6b0f Initialize context creation APIs on demand 2016-07-20 13:10:51 +02:00
Camilla Berglund
52d801bd19 Cleanup 2016-07-19 00:15:34 +02:00
Camilla Berglund
ac09592355 Call context GetProcAddress directly 2016-07-18 23:31:54 +02:00
Camilla Berglund
fb418b26d7 Fix grammar
Fixes #776.
2016-07-17 15:39:25 +02:00
Camilla Berglund
0ff22e4a49 Win32: Fix GLFW_MAXIMIZED ignored by first window
Fixes #780.
2016-07-12 16:04:02 +02:00
Camilla Berglund
613868b893 Add missing assertion 2016-07-11 16:39:53 +02:00
Camilla Berglund
3bb5c459d6 GLX: Verify all entry points during load 2016-07-01 18:18:04 +02:00
Camilla Berglund
145ea03ca2 EGL: Verify all entry points during load 2016-07-01 18:17:30 +02:00
Camilla Berglund
49f429018e Win32: Fix code analysis warning 2016-06-23 17:41:22 +02:00
Camilla Berglund
66149a29da Cleanup 2016-06-23 17:40:30 +02:00
Camilla Berglund
0ee8159f6c Win32: Remove intermediate clipboard string copy 2016-06-23 17:06:03 +02:00
Camilla Berglund
1b82546b90 Cleanup 2016-06-23 15:34:23 +02:00
Camilla Berglund
e250c226ca Cleanup 2016-06-23 14:48:25 +02:00
Camilla Berglund
7f2e4d8ace Win32: Fix possible leak of dummy context 2016-06-23 14:17:54 +02:00
Camilla Berglund
6f313ff245 Win32: Use helper window to load WGL extensions
This removes window re-creation logic by performing the initial context
creation on the helper window, simplifying both window and context
creation and paving the way for attaching to existing window handles
without compromising on context or framebuffer hint support.
2016-06-22 23:33:34 +02:00
Camilla Berglund
a991c01731 Fail sharing if either window is context-less 2016-06-22 14:36:46 +02:00
Camilla Berglund
f2ba78e04b Rename static functions to allow unity build
Fixes regression introduced by GLFW_CONTEXT_CREATION_API.

Fixes #783.
2016-06-15 01:35:07 +02:00
Camilla Berglund
df5dcf5162 Win32: Fix stub comment 2016-06-15 01:35:07 +02:00
Camilla Berglund
76801973e1 Cocoa: Clean up joystick globals 2016-06-15 01:35:07 +02:00
Camilla Berglund
b6b8ff591d Fix cursor position coordinate delimiter
Comma would be great but we don't control the locale.
2016-06-15 01:35:07 +02:00
Camilla Berglund
9a781cef53 Formatting 2016-06-15 01:35:07 +02:00
Camilla Berglund
aaccfd8201 I don't know how to C
Fixes #773.
2016-06-15 01:35:07 +02:00
Camilla Berglund
5f17b61ff2 Win32: Remove accidental C99 2016-06-02 15:57:47 +02:00
Camilla Berglund
757eea2779 Update email address 2016-06-01 21:25:20 +02:00
Camilla Berglund
6a8e169001 Update copyright notice year 2016-06-01 21:25:19 +02:00
Camilla Berglund
28d4c9e9f4 X11: Re-enable cursor for all types of FocusOut
This prevents disabled cursor mode from interfering with window frame
interactions.

Related to #650.
2016-05-31 13:04:04 +02:00
Camilla Berglund
ed076b7c5b Win32: Re-enable cursor during modal loops
Related to #650.
2016-05-31 12:59:41 +02:00
Camilla Berglund
915a98c560 Add missing XFlush calls 2016-05-30 22:14:13 +02:00
Camilla Berglund
2d2756cbad Simplify cursor window logic 2016-05-30 22:12:33 +02:00
Camilla Berglund
03db3ed6e9 Cleanup 2016-05-30 21:19:00 +02:00
Camilla Berglund
bda031f4ac Cleanup 2016-05-29 15:34:08 +02:00
Camilla Berglund
797ee8d8e3 Move all cursor positioning to platform code
Due to Wayland, shared code cannot rely on cursor positioning being
supported by the underlying platform.

This implicitly fixes #617 as it moves cursor centering into
_glfwPlatformSetCursorMode, thus separating it from the stale value of
_glfw.cursorWindow.

Fixes #617.
2016-05-29 15:33:49 +02:00
Camilla Berglund
0e846883bf Clarify cursor position variable names 2016-05-27 02:39:03 +02:00
Camilla Berglund
72b3a7a59f Move comment to the actual line being discussed 2016-05-27 02:39:03 +02:00
Camilla Berglund
32f38b97d5 Fix OS X key names not following layout 2016-05-24 22:12:15 +02:00
Camilla Berglund
7fd7dca375 Remove completed todo 2016-05-23 22:59:11 +02:00
Camilla Berglund
edb284f189 Add more argument value checks 2016-05-23 15:23:14 +02:00
Camilla Berglund
54cb23d234 Fix value checks failing on GLFW_DONT_CARE 2016-05-23 15:23:14 +02:00
Camilla Berglund
c4c99727c5 Add dynamic loading of HIToolbox.framework
Fixes #717.
2016-05-23 15:21:56 +02:00
Camilla Berglund
57f4ba7b37 Add basic argument checks for glfwSetWindowMonitor 2016-05-23 15:19:09 +02:00
Camilla Berglund
cd49efa84e Enable Cocoa multi-threaded mode 2016-05-22 14:02:29 +02:00
Camilla Berglund
bc649e1632 Formatting 2016-05-11 15:23:27 +02:00
ocornut
3c1a83d61f Fix keys filtered by IME being passed to callback
Closes #651.
2016-05-10 12:30:04 +02:00
Brandon Schaefer
4eb7cbac47 Mir: Remove workaround for LP bug 1477285
Closes #756.
2016-05-05 14:22:57 +02:00
linkmauve
a502152075 wayland: Always make the window surface opaque 2016-05-05 14:15:44 +02:00
Camilla Berglund
ef80beab81 Add run-time context creation API selection
Fixes #145.
2016-05-04 17:00:07 +02:00
Camilla Berglund
9d50a346f0 Fix X11 build on non-Linux systems 2016-05-04 17:00:06 +02:00
Camilla Berglund
12a695696d Add validation of size limit and aspect ratio args 2016-05-04 16:34:52 +02:00
Camilla Berglund
e640d840b7 Fix Win32 window size event race condition
The old window size was reported after re-entering full screen and
setting and reporting the new window size.

Fixes #740.
2016-05-04 16:34:48 +02:00
Camilla Berglund
11d051b69a Formatting 2016-05-03 13:43:17 +02:00
Camilla Berglund
932a161d44 Unconditionally use some EWMH atoms
These window properties do no harm if they're declared even if the WM
doesn't support them.  This makes GLFW slightly more tolerant of WM
changes as well as things like Ubuntu Unity reading _NET_WM_ICON without
declaring support for it.
2016-05-03 13:40:53 +02:00
Camilla Berglund
211bdab51f Fix NET_WM_STATE clobbering at creation 2016-05-03 13:40:53 +02:00
Camilla Berglund
6fcedb5396 Fix GLFW_RESIZABLE on X11 when exiting full screen
The WM normal hints were set with the wrong window dimensions.

Fixes #737.
2016-05-03 13:40:34 +02:00
bschaefer
e44fd87fa3 Mir: Fix button states 2016-05-02 21:59:57 +02:00
bschaefer
f000b5daff Mir: Fix window/context creation order
Need to create the native window before creating the context as creating
the context creates the EGL surface.
2016-05-02 21:58:54 +02:00
Emmanuel Gil Peyrot
1e82832737 wayland: Report unsupported operations as errors 2016-05-02 21:49:57 +02:00
Emmanuel Gil Peyrot
c301a1e51a wayland: Implement remaining attribute getters 2016-05-02 21:49:31 +02:00
Emmanuel Gil Peyrot
e673bdc617 wayland: Implement maximized state 2016-05-02 21:49:27 +02:00
Emmanuel Gil Peyrot
71cedc6cfe wayland: Implement glfwSetWindowMonitor 2016-05-02 21:49:23 +02:00
Emmanuel Gil Peyrot
5034c6c65e wayland: Handle hidden window as no shell surface 2016-05-02 21:47:21 +02:00
Emmanuel Gil Peyrot
f0f5d9f644 wayland: Implement size limits and aspect ratio 2016-05-02 21:47:00 +02:00
Camilla Berglund
0b6a4313dd Create EWMH and XDND atoms on demand 2016-05-01 23:01:48 +02:00
IntellectualKitty
3b0b5dacf5 Fix test for joystick presence in matchCallback
The matchCallback function has an initial loop to filter out redundant
joystick additions based on matching deviceRef values.  However, the if
statement incorrectly combines this test with the condition that the
joystick is not present, which is obviously incorrect.

Closes #753.
2016-04-27 15:42:19 +02:00
Camilla Berglund
99dc2c48bd Fix setting of GLFW_MAXIMIZED hint
Caused by a bad rebase.

Fixes #738.
2016-04-17 13:44:07 +02:00
Camilla Berglund
135ed7feb4 Fix build on legacy MinGW 2016-03-31 15:04:25 +02:00
Camilla Berglund
bd345164d3 Fix missing constant on VC++ 2010 2016-03-31 13:07:06 +02:00
Camilla Berglund
7cbdae1bed Add initial DirectInput 8 support
Fixes #232.
2016-03-31 12:24:01 +02:00
Camilla Berglund
3aebb0bfe3 Cleanup 2016-03-31 12:23:49 +02:00
Camilla Berglund
8a7fa306ce Add glfwSetJoystickCallback 2016-03-31 12:12:09 +02:00
Camilla Berglund
bdd17c337f Make helper window child of HWND_MESSAGE 2016-03-31 12:12:08 +02:00
Camilla Berglund
eb3577c1eb Add initial XInput support 2016-03-31 12:12:04 +02:00
Camilla Berglund
c580949417 Cleanup 2016-03-29 14:01:06 +02:00
IntellectualKitty
ae4ece840d Remove redundant OS X joystick polling
Closes #729.
2016-03-29 14:00:13 +02:00
Camilla Berglund
c234a19423 Fix invalid EGL display being terminated 2016-03-29 11:13:07 +02:00
Camilla Berglund
20574fa81f Fix VC++ warnings 2016-03-29 11:13:07 +02:00
Camilla Berglund
29e232f4b2 Improved error messages 2016-03-29 11:13:06 +02:00
Camilla Berglund
33c68a24a0 Formatting
[ci skip]
2016-03-29 11:12:49 +02:00
Camilla Berglund
f96d865b93 Cleanup 2016-03-28 20:16:53 +02:00
Camilla Berglund
925208d28f Fix copypaste mistake 2016-03-28 12:44:50 +02:00
Camilla Berglund
7ab7d8b4b1 Make use of uint32_t where appropriate
This change does not affect the ABI.
2016-03-28 12:34:57 +02:00
Camilla Berglund
5661d03be8 Replace GLFWuint64 with uint64_t
C99 stdint.h is provided by VS 2010 and later.  GLFW has not provided
testing or binaries for VS 2008 for several releases.

For earlier versions of VS there are third-party alternatives:

https://msinttypes.googlecode.com/svn/trunk/stdint.h
http://www.azillionmonkeys.com/qed/pstdint.h

This change does not affect the ABI.
2016-03-28 12:34:44 +02:00
Camilla Berglund
5eb2e83c82 Cleanup 2016-03-28 12:26:08 +02:00
Camilla Berglund
c1e4c45c7a Replace Win32 window long with window property
Related to #25.
2016-03-28 10:57:19 +02:00
Camilla Berglund
3503cba5d9 Fix Ctrl+Pause reported as unknown key on Win32
Fixes #730
2016-03-24 21:26:57 +01:00
Camilla Berglund
17bcefeac1 Fix CGL context not being released until later
Fixes #721.
2016-03-18 12:01:48 +01:00
Camilla Berglund
6570d0c4b7 Add glfwSetWindowMonitor
This adds the ability to switch between windowed and full screen modes,
move a full screen window between monitors and update its desired
resolution and refresh rate.

Fixes #43.
2016-03-18 11:13:24 +01:00
Camilla Berglund
99c925efd8 Add tracking of which window 'owns' a monitor 2016-03-16 16:16:29 +01:00
Camilla Berglund
ea888114fa Remove monitor from _GLFWwndconfig 2016-03-16 16:16:02 +01:00
Camilla Berglund
3a6fe042ea Cleanup 2016-03-16 16:15:49 +01:00
Camilla Berglund
0d1dd82b89 Move X11 PPosition hack to glfwSetWindowPos 2016-03-16 16:11:35 +01:00
Camilla Berglund
ea73ccf22d Add support for EWMH _NET_WM_WINDOW_TYPE 2016-03-16 16:07:22 +01:00
Camilla Berglund
86751b42a6 Fix OS X default max window size 2016-03-16 15:05:50 +01:00
Camilla Berglund
9a78fd049d Fix view not being made first responder 2016-03-16 14:48:53 +01:00
Camilla Berglund
89f438de5a Fix window focus regression
Regression caused by baf574494d.
2016-03-15 22:22:51 +01:00
Camilla Berglund
4e4b8727fc Fix Win32 icon restoration 2016-03-11 14:41:58 +01:00
Camilla Berglund
d2338f3a49 Fix X11 icon image copy 2016-03-11 14:41:57 +01:00
Camilla Berglund
b823f7151e Add glfwSetWindowIcon
Adds support for setting window icons programmatically on platforms
where this makes sense.

Fixes #453.
Closes #467.
2016-03-10 17:26:26 +01:00
Camilla Berglund
fca5a8ab48 Fix Win32 custom cursor set for non-client area
Udating the cursor via glfwSetCursor incorrectly included the non-client
area of the window.
2016-03-07 12:30:25 +01:00
Camilla Berglund
5620895e88 Add glfwWaitEventsTimeout
This function will put the calling thread to sleep until an event
arrives or until the specified timeout has elapsed.
2016-03-06 17:28:40 +01:00
Camilla Berglund
31f67dd3cc Add glfwGetTimerValue and glfwGetTimerFrequency
This adds raw timer access to the public API and builds the
floating-point time functions on top.  It also makes the GLFWuint64 type
public.
2016-03-06 11:51:23 +01:00
Camilla Berglund
8221aadea3 Include stddef.h unconditionally in public header 2016-03-06 09:40:16 +01:00
Camilla Berglund
663ee327b0 Decrease amount of Hocus Pocus 2016-03-02 23:15:02 +01:00
Camilla Berglund
de2d4c7763 Clarify pointer assertions 2016-03-02 17:58:05 +01:00
Camilla Berglund
5fa7e2faa4 Release autorelease pool last 2016-03-01 19:36:05 +01:00
Camilla Berglund
5dc9d0f581 Avoid X11 frame size query of undecorated windows
This also works around an issue where Xfwm4 ignores Motif hints when
calculating frame extents.
2016-02-28 18:44:50 +01:00
Camilla Berglund
6494da3101 Fix reporting of non-root X11 window positions
Fixes #517.
2016-02-28 16:09:43 +01:00
Camilla Berglund
e51e27fcab Add back tracking of X11 override-redirect 2016-02-28 16:09:36 +01:00
Camilla Berglund
73216e5fb1 Fix NSBeep being emitted for some keys
Fixes #719.
2016-02-28 11:02:26 +01:00