Camilla Löwy
781fbbadb0
Fix Threads package not located by our config file
...
This fixes a missing dependency error when the imported GLFW target is
a static library.
Thanks to @mosra for reporting the bug.
2019-12-26 16:31:42 +01:00
Camilla Löwy
a3d28ef52c
X11: Fix IC event mask not being added to our window
2019-12-26 16:31:42 +01:00
Camilla Löwy
8149a5fc00
X11: Cleanup
...
We can use C99 now and also we will need the event mask below.
2019-12-26 16:31:41 +01:00
Luflosi
74a46dfa0c
Use the correct type in a for loop
...
The `sizeof()` operator has the type `size_t`, so the `for` loop
iterating over it should use the same type.
Closes #1614 .
2019-12-26 16:31:37 +01:00
Camilla Löwy
4ec7daf3e9
Cocoa: Replace display link with IOKit query
...
This removes the final dependency on CoreVideo, using a display link to
get the refresh rate of monitors where Core Graphics report a refresh
rate of zero. Instead we now query the I/O registry directly, similarly
to what the display link does at creation.
Thanks to @OneSadCookie for pointers to this solution.
2019-12-25 21:53:04 +01:00
Camilla Löwy
c3ca88055f
NSGL: Simulate vsync for occluded windows
...
This only supports a swap interval of zero or one, as that is all NSGL
supports.
2019-12-20 09:49:55 +01:00
Camilla Löwy
54e8e0b092
NSGL: Remove problematic swap interval workaround
...
Fixes #1483 .
2019-12-20 09:46:48 +01:00
Camilla Löwy
b4a8eb9b19
Cocoa: Only create per-monitor display link once
...
The display link query is not specific to any particular display mode
and so only needs to be done once.
The next step is to replace the display link altogether by querying
IOKit directly, which is what the display link does.
2019-12-20 09:46:48 +01:00
Camilla Löwy
28773a069e
Cocoa: Fix undeclared selector warnings
2019-12-20 09:46:48 +01:00
Camilla Löwy
73a8ebb691
X11: Cleanup
...
This is technically valid but misleading and may inspire future bugs
like the one fixed by 0b652a44d2
.
2019-12-17 02:17:31 +01:00
Camilla Löwy
4e70c95aa3
X11: Cleanup
...
The window state action is not an atom.
2019-12-17 01:53:48 +01:00
Camilla Löwy
9db156421f
X11: Fix updating GLFW_FLOATING on a hidden window
2019-12-17 01:53:40 +01:00
Camilla Löwy
0b652a44d2
X11: Fix invalid read when clearing GLFW_FLOATING
2019-12-17 01:51:35 +01:00
Camilla Löwy
9b6d68ec70
X11: Fix missing checks for EWMH attention atoms
2019-12-16 16:22:22 +01:00
Camilla Löwy
4837b78ffe
X11: Fix maximization of hidden windows
...
This fixes glfwMaximizeWindow having no effect on hidden windows by
manually appending the maximization states to the EWMH state property.
2019-12-16 16:22:15 +01:00
Camilla Löwy
bc3be40f21
Enable strict C99 for non-VS compilers
2019-12-16 12:48:32 +01:00
Camilla Löwy
da3f20d860
Win32: Add missing include for wcscmp
2019-12-15 18:37:57 +01:00
Camilla Löwy
fb0028c766
Win32: Enable Unicode mode for all compilers
2019-12-15 18:37:57 +01:00
Camilla Löwy
994c3b4e48
Cocoa: Remove stale GCC workaround
2019-12-15 18:37:57 +01:00
Camilla Löwy
18307467b4
Gather CMake setup of configuration header
2019-12-15 18:37:57 +01:00
Camilla Löwy
49c5d837b4
Replace CMake threads variable with modern target
2019-12-15 18:37:56 +01:00
Camilla Löwy
8a5fd0c5a4
Replace ad-hoc CMake code with DEFINE_SYMBOL
...
This target property does what we were doing manually.
2019-12-15 18:37:56 +01:00
Camilla Löwy
a5ed740d9d
Fix use of CMake 3.13 command target_link_options
2019-12-15 18:37:56 +01:00
Camilla Löwy
a264d32987
Replace CMake list variables with target_sources
2019-12-15 18:37:56 +01:00
Camilla Löwy
081484ed34
Fix POSIX conformance issues for clock_gettime
...
CLOCK_MONOTONIC should not be used as a feature macro. The POSIX
feature macros are provided by unistd.h. CLOCK_MONOTONIC is provided by
time.h. CLOCK_MONOTONIC requires _POSIX_C_SOURCE >= 199309L on some
systems.
2019-12-15 18:15:40 +01:00
Camilla Löwy
506a6aafde
Formatting
2019-12-11 22:10:00 +01:00
Camilla Löwy
a875a536b7
Cocoa: Fix duplicate conversion of title string
2019-12-11 22:08:56 +01:00
Camilla Löwy
2551829f75
Win32: Add VERSIONINFO resource to GLFW DLL
...
This will let people see the API version in the Explorer property box.
2019-12-11 21:02:08 +01:00
Camilla Löwy
59055d585f
Update minimum required CMake version to 3.1
2019-12-09 23:48:26 +01:00
Camilla Löwy
c194193797
Replace CMake generator expression with variable
...
Generator expressions are amazing but best used in moderation.
2019-12-09 23:35:51 +01:00
Camilla Löwy
9dc365f192
Merge GCC/Clang specific CMake blocks
2019-12-09 23:35:51 +01:00
Camilla Löwy
197193ac0b
Fix source list for Objective-C fix
2019-12-09 23:35:51 +01:00
Camilla Löwy
9486ec0c02
Fix source list for -Wdeclaration-after-statement
...
The context creation files were not included on platforms other than
Win32.
2019-12-09 23:35:50 +01:00
Camilla Löwy
bc7b19cbd1
Remove tab character
2019-12-09 23:35:50 +01:00
Camilla Löwy
f6d44cedfd
Trust CMake to do the right thing for static libs
...
CMake understands what private library dependencies for a static library
means and handles it correctly.
2019-12-09 23:35:40 +01:00
Camilla Löwy
fa60269245
NSGL: Fix disabling of Retina resolution
...
It appears the default is now YES.
Fixes #1442 .
2019-12-09 22:25:59 +01:00
Camilla Löwy
6e6805000a
Cocoa: Fix pre-window-creation event processing
...
Polling the event queue before NSApp had been allowed to finish
launching, in our case by starting our self-terminating run loop,
triggered an assertion inside NSApplication.
This fix, which makes all event processing functions capable of starting
it, makes that assertion less likely.
A more Cocoa-friendly fix would be to finish launching NSApp during
glfwInit and let people annoyed by the menu bar disabled it with
GLFW_COCOA_MENUBAR. That may not be suitable for 3.3-stable, though.
Fixes #1543 .
2019-12-09 22:25:59 +01:00
Camilla Löwy
b3544ca43e
Cocoa: Update outdated comment
2019-12-09 18:46:31 +01:00
Emmanuel Gil Peyrot
ef6189f348
Wayland: Unset the cursor name on border exit
...
It would previously conserve the last name it had before leaving the
border, sometimes desynchronising with what it should have been.
2019-12-08 21:58:11 +01:00
Camilla Löwy
7dbdd2e6a5
Add more standard cursors
...
This adds the standard cursors for diagonal and omnidirectional
resize/move and operation-not-allowed. It also adds new (better?) names
for the horizontal and vertical resize/move and pointing hand cursors.
References:
- https://developer.apple.com/documentation/appkit/nscursor
- https://stackoverflow.com/questions/10733228/
- https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setsystemcursor
- https://freedesktop.org/wiki/Specifications/cursor-spec/
- https://tronche.com/gui/x/xlib/appendix/b/
Related to #427 .
2019-11-28 22:24:00 +01:00
Camilla Löwy
80fde12fda
Wayland: Fix pointing hand cursor shape
...
Related to #1432 .
2019-11-25 18:55:50 +01:00
Emmanuel Gil Peyrot
a80788c17f
Wayland: Don’t update cursor position in the frame
...
That way the application only sees the cursor moving when it is inside
of its area, it won’t go back to the top or left side when trying to
resize the window or just hovering the fallback decorations.
2019-11-21 13:53:08 +01:00
Emmanuel Gil Peyrot
a9f674e719
Wayland: Don’t reload the cursor on every pointer motion
...
Previously, any pointer motion in the window decorations when using the
fallback implementation would obtain the wl_cursor again, and do the
attach danse for no benefit.
This will ultimately allow animated cursors to not reset to the first
frame on motion, once these will be implemented.
2019-11-21 13:52:37 +01:00
Camilla Löwy
e96dc5d219
X11: Assume 96 DPI if RandR monitor size is zero
...
This falls back to calculating the monitor physical size from the
current resolution and the default X11 DPI when the physical size
returned by RandR is zero.
2019-11-14 19:49:23 +01:00
Camilla Löwy
2c519709be
Cocoa: Fix full screen window iconification
...
Iconification (miniaturization) of undecorated windows stopped working
unless the window has the NSWindowStyleMaskMiniaturizable style.
2019-11-13 14:08:28 +01:00
Camilla Löwy
bd452016be
Cocoa: Cleanup
...
Readability fix, does not affect generated code.
2019-11-11 22:49:00 +01:00
Camilla Löwy
bac15f9449
Cocoa: Fix multiple methods warning
...
This fixes a warning due to us using bare ids and
NSCollectionLayoutAnchor having a message with the same name.
2019-11-11 22:49:00 +01:00
Camilla Löwy
c819f27ce3
Cocoa: Process events after window destruction
...
On macOS a destroyed window remained on screen until the next time
events were processed. This makes the behavior more consistent with
other platforms.
Fixes #1412 .
2019-11-11 22:49:00 +01:00
Camilla Löwy
94cb0347ab
Cocoa: Add comments for Cocoa symbol macros
2019-11-11 22:49:00 +01:00
Camilla Löwy
8e288dc94c
Win32: Add GLFW_WIN32_KEYBOARD_MENU
...
This platform specific window hint enables access to the Windows window
menu via the keyboard shortcuts.
2019-11-11 22:37:18 +01:00