Commit Graph

384 Commits

Author SHA1 Message Date
Camilla Löwy
9e56099edd Add glfwSetWindowAttrib
This function allows updating the GLFW_DECORATED, GLFW_RESIZABLE,
GLFW_FLOATING and GLFW_AUTO_ICONIFY attributes for existing windows.

Fixes #537.
2016-12-06 15:59:18 +01:00
Camilla Löwy
f4d0c83181 Paperwork done 2016-11-30 14:00:41 +01:00
Camilla Berglund
c156b50e4c Add glfwSetWindowMaximizeCallback
Fixes #778.
2016-09-29 01:24:56 +02:00
Camilla Berglund
e6a32db7b9 Cleanup 2016-09-07 16:49:29 +02:00
Camilla Berglund
bb3cb8f233 Cleanup
Clean up code and documentation for glfwGetKeyScancode and add
implementation for Wayland and Mir.

Related to #830.
2016-09-07 16:46:48 +02:00
Michael Stocker
e745b0dd47 Add glfwGetKeyScancode
Allows retrieval of platform scancode from GLFW_KEY_*.  Implemented for
Win32, Cocoa and X11.  Stubs for Mir and Wayland.

Closes #830.
2016-09-07 16:38:22 +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
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
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
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
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
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
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
d5e00e6b0f Initialize context creation APIs on demand 2016-07-20 13:10:51 +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
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
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
7fd7dca375 Remove completed todo 2016-05-23 22:59:11 +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
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
Camilla Berglund
8a7fa306ce Add glfwSetJoystickCallback 2016-03-31 12:12:09 +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
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
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
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
663ee327b0 Decrease amount of Hocus Pocus 2016-03-02 23:15:02 +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
baf574494d Add glfwFocusWindow
This removes the (undocumented) behavior where glfwShowWindow would
bring the window to front and set input focus.  That function now
does what it says.
2016-02-25 21:37:40 +01:00
Camilla Berglund
7669ade19c Make instance extension count unsigned
Fixes #714.
2016-02-22 10:44:43 +01:00
Camilla Berglund
2be2e0fa86 Fix X11 WSI extension selection logic 2016-02-21 18:36:28 +01:00
Camilla Berglund
bda18bc899 Remove XInput2 XI_Motion support
Sadly, this interferes with the Steam overlay.

Fixes #304.
2016-02-21 18:32:57 +01:00
Camilla Berglund
a10caa4631 Add glfwMaximizeWindow and GLFW_MAXIMIZED
Fixes #266.
2016-02-21 15:32:26 +01:00
Camilla Berglund
3b64bae323 Fix X11 WSI extension selection logic 2016-02-19 08:56:46 +01:00
Camilla Berglund
7da0ffa5ea Formatting 2016-02-18 22:28:26 +01:00
Camilla Berglund
6e103d5dca Change priority order of X11 WSI extensions 2016-02-18 20:05:35 +01:00
Camilla Berglund
9b75bffc88 Add basic Vulkan support
Added GLFW_INCLUDE_VULKAN.  Added glfwVulkanSupported,
glfwGetRequiredInstanceExtensions, glfwGetInstanceProcAddress,
glfwGetPhysicalDevicePresentationSupport and glfwCreateWindowSurface.
Added port of LunarG SDK tri example.
2016-02-16 14:58:58 +01:00
Camilla Berglund
12b6c56903 Add suffixes to platform specific helper functions
Also merge win32_tls.h into win32_platform.h.
2015-12-13 14:50:59 +01:00
Camilla Berglund
9c315412e1 Add glfwGetKeyName
Fixes #464.
2015-11-09 14:46:09 +01:00
Camilla Berglund
97d8ea8119 Fix decoding overrun in UTF-8 XIM path 2015-10-27 23:01:02 +01:00
Camilla Berglund
496f559c9a Add GLFW_NO_API for creating context-less windows 2015-10-26 00:30:30 +01:00
Camilla Berglund
d95b77ebec Fix monitor notifications on X11
Fixes #288.
2015-10-24 23:25:20 +02:00
Camilla Berglund
154b01e8cf Cleanup 2015-10-24 23:24:54 +02:00
Camilla Berglund
d84772d620 Add size limits and aspect ratio functions
Fixes #555.
2015-10-18 17:18:29 +02:00
Camilla Berglund
0eccf75f65 Replace GL booleans with public macros 2015-10-13 00:46:02 +02:00
Camilla Berglund
13fbb4748a Clean up cursor mode setting 2015-10-12 22:01:50 +02:00
Camilla Berglund
95a07f3340 Start 3.2 2015-10-12 21:59:49 +02:00
Camilla Berglund
0d759c8c1a Fix XBufferOverflow handling for XIM input 2015-10-09 14:16:01 +02:00
Camilla Berglund
87ad8c0561 Fix XIM input on non-UTF-8 locales 2015-10-09 13:26:23 +02:00
Camilla Berglund
67eadf1e97 Fix glfwIconifyWindow not restoring video mode
Fixes #590.
2015-09-07 16:32:10 +02:00
Camilla Berglund
b69b4a9f2a Remove global symbols for Motif WM hints 2015-08-18 13:34:51 +02:00
Camilla Berglund
e528a8c7a4 Clarify comment for X11 translateKey 2015-08-16 15:12:13 +02:00
Camilla Berglund
9f5a483256 Fix glfwWaitEvents returning prematurely on X11 2015-08-14 13:52:02 +02:00
Camilla Berglund
cc752ad6a0 Fix EINTR not being handled for select on X11
Closes #580.
2015-08-14 13:49:52 +02:00
Camilla Berglund
ca8912375c Fix Motif hints being set for X11 full screen
Related to #575.
2015-08-12 18:02:45 +02:00
Camilla Berglund
527952102a Fixed filtering of events duplicated by XIM.
Duplicate events cannot be filtered by the return value of XFilterEvent,
as that discards dead key events on some IMs (ibus), nor by its inverse,
as that discards all key events on other IMs (?).  This solution is
based on the workaround in SDL2 and takes advantage of the identical
time of the duplicate events.

Fixes #548.
Closes #554.
Closes #571.
2015-08-07 16:53:43 +02:00
Camilla Berglund
f825af06f0 Formatting. 2015-07-14 15:45:22 +02:00
Camilla Berglund
19a28e2c9f Fixed X11 arrow cursor image.
Fixes #541.
2015-06-25 12:59:51 +02:00
Camilla Berglund
1984d40e33 Formatting. 2015-06-25 01:23:23 +02:00
Camilla Berglund
cf4206d987 Fixed duplicate key presses caused by XIM.
Probably.
2015-06-25 00:43:12 +02:00
Camilla Berglund
cc4c232956 Renamed cursor window library struct member.
Since _glfwPlatformWindowFocused it has a more limited role.
2015-06-17 12:06:45 +02:00
Camilla Berglund
3365139a6c Cleanup. 2015-06-16 12:10:20 +02:00
Camilla Berglund
b15eaeda16 Implemented auto-iconification on X11.
Fixes #531.
2015-06-15 18:46:45 +02:00
Camilla Berglund
e049190ff1 Moved focus callback triggering last. 2015-06-15 18:46:45 +02:00
Camilla Berglund
dba59cf903 Improved X11 focus event filtering.
Some focus events need to be ignored to allow functionality like
Alt+Tab and volume indicators to not affect application-visible window
focus.  However, the previous filtering was too broad and missed virtual
desktop switching, Alt+Tab and programmatic iconification.

Fixes #405.
2015-06-15 18:44:54 +02:00
Camilla Berglund
56122cbe2f Keep X11 full screen window properties on iconify. 2015-06-15 15:32:35 +02:00
Camilla Berglund
c77edaee34 Always pre-position X11 full screen windows. 2015-06-15 15:32:35 +02:00
Camilla Berglund
21ce21cc07 Improved X11 full screen focus control flow. 2015-06-15 15:32:16 +02:00
Camilla Berglund
6cf15615e8 Clarified EWMH full screen error messages. 2015-06-15 14:39:56 +02:00
Camilla Berglund
a1399426c3 Removed superfluous X11 window struct member. 2015-06-15 14:38:13 +02:00