aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2021-12-16Add puglGetClassName()David Robillard1-0/+6
2021-12-16Add puglGetWindowTitle()David Robillard1-0/+6
2021-12-16Add puglGetParentWindow()David Robillard1-0/+6
2021-12-16Add puglGetTransientParent()David Robillard1-0/+6
2021-12-16Rename puglSetTransientFor to puglSetTransientParentDavid Robillard3-3/+3
2021-12-16X11: Fix potential crash in puglGrabFocus()David Robillard1-1/+10
This is really a mistake in user code, but things shouldn't crash in general. So, this commit fixes the crash and adds some documentation so that developers hopefully don't try to grab focus before it makes sense. The case that was previously a crash will now gracefully fail, that is, the focus will not be (and can not be) grabbed.
2021-10-09Use the correct macro for GLX_CONTEXT_PROFILE_MASK_ARBfalkTX1-1/+1
GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB is the correct counterpart to GLX_CONTEXT_CORE_PROFILE_BIT_ARB in this context. This has the same value as the GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB it replaces though, so this change should not actually affect anything.
2021-10-09Only call SetProcessDPIAware in programsfalkTX1-10/+11
This prevents plugins from changing global host state, which causes serious problems in hosts that are not DPI aware.
2021-08-28Suppress new clang-tidy warningsDavid Robillard1-0/+2
2021-08-28X11: Check for XRandR extension before usagefalkTX1-6/+9
It happens in practice that XRandR is enabled in the build but is not available at runtime, particularly with X11 forwarding over SSH. This properly queries the extension first to avoid crashing in such situations.
2021-08-25Fix whitespaceDavid Robillard1-1/+2
2021-08-25MacOS: Fix build on MacOS 10.9 and earlierfalkTX1-0/+1
NSEventSubtype was introduced in 10.10.
2021-06-07MacOS: Reset GL context after initial window reshapefalkTX1-0/+1
2021-06-07MacOS: Fix conversion warningfalkTX1-1/+1
2021-05-28Fix questionable float equality comparisonDavid Robillard2-5/+5
This avoids a warning, and makes more sense in this situation anyway because negatives are also a bad configuration.
2021-05-27Make code build cleanly as C++David Robillard2-4/+14
2021-05-27Fix missing function sentinelDavid Robillard1-1/+1
2021-05-27Avoid confusing fallthrough structureDavid Robillard1-6/+4
2021-05-25Rename event structs in a more readable styleDavid Robillard14-43/+43
Aside from reading more naturally, this avoids clashes with types that are not events, like PuglEventFlags. This is also more consistent with the C++ bindings, where "EventExpose" would be quite strange, for example. Apologies for the noise. Aliases to the old names will be preserved in the deprecated API like other things for a short while.
2021-05-25Fix some conversion warningsDavid Robillard2-8/+8
Avoids narrowing warnings when building as C++, and uses unsigned operands with bitwise operators in various places.
2021-05-25Windows: Make puglSetFrame() consistent with X11falkTX1-2/+1
2021-05-25X11: Do not override _POSIX_C_SOURCE if already definedfalkTX1-1/+3
2021-05-24Shrink codeDavid Robillard1-4/+1
2021-05-24Separate stub backends from other backendsDavid Robillard11-183/+217
Stub backends were a dependency of other backends to allow some code reuse. However, that can cause conflicting symbols if multiple backends are linked into the same binary, which should be possible. To avoid this, move the shared code into the platform implementation, and export those symbols so that backends can use them. This adds some semi-public platform-specific API that can only be used by backends included with pugl. They are undocumented, subject to change at any time without a corresponding version change, and may not be used by third parties (for example by custom backends in an application).
2021-05-24Fix the declaration of WGL function typesJean Pierre Cimalando1-4/+10
2021-05-14Remove redundant conditionalRichard Gill1-5/+1
2021-05-08Send unmap/map events when the view is minimized/restoredDavid Robillard5-33/+139
X11 Window managers set WM_STATE to notify about minimization, often without sending core X visibility events (which seems odd to me, but that's what Gnome does anyway). So, implement this protocol and send map/unmap events to the view, and adjust the Windows implementation to do the same for consistency across all platforms.
2021-05-08X11: Always send an initial configure before mapDavid Robillard1-1/+1
I think the conditional here was because this is typical when the view is embedded, but window manager behaviour is all over the place and this is something we want to always guarantee.
2021-05-08X11: Factor out translateClientMessage()David Robillard1-12/+21
2021-05-06Strengthen clang-tidy warningsDavid Robillard2-3/+1
2021-05-06Clean up X11 implementationDavid Robillard2-153/+113
2021-05-06Add basic test for Vulkan supportDavid Robillard1-5/+2
2021-05-06Add test for copy/pasteDavid Robillard1-5/+4
2021-05-03Clean up includes and add mappings for old versions of IWYUDavid Robillard1-0/+2
2021-05-03MacOS: Make puglGetNativeWorld() return the NSApplicationDavid Robillard1-2/+2
2021-05-03Shrink puglGetViewHint() implementationDavid Robillard1-5/+1
2021-05-03Fix crash when freeing a view that has not been configuredDavid Robillard2-4/+14
2021-05-03Fix questionable event castsDavid Robillard3-29/+66
I don't think there is any UB actually happening here, but some of these were casting to a pointer of a larger type, which is problematic. Unfortunately, it makes for quite a bit of tedious verbosity, but I don't see a decent way around that in C99.
2021-04-21MacOS: Fix memory leaks in puglUpdate()Bjarke Bech1-24/+26
2021-01-28Fix size hints on X11David Robillard1-3/+6
2021-01-28Fix puglSetMaxSize() on X11David Robillard1-2/+2
2021-01-25Fix warnings when compiling for X11 as C++David Robillard1-2/+6
2021-01-02Avoid "else" after "return"David Robillard3-9/+18
2021-01-02Use email address instead of website for attributionDavid Robillard3-3/+3
2021-01-02Clean up includesDavid Robillard2-1/+2
2021-01-02Simplify clang-format configuration and format all codeDavid Robillard21-4018/+4074
2020-12-11Fix a conversion warning with MinGWDavid Robillard1-1/+2
2020-12-01Make puglShow() realize automatically on Windows and MacOSDavid Robillard2-0/+14
2020-11-26Remove file documentationDavid Robillard20-97/+0
These will not be used in the Sphinx documentation, and most were self-explanatory and only there to make the Doxygen index look nice anyway. Where there was actually useful information, it has been preserved as regular comments.
2020-11-25Rename puglShowWindow and puglHideWindow to puglShow an puglHideDavid Robillard4-6/+18
These names were confusing because a view is not necessarily a window. Since there's no room for ambiguity here, simply drop the superfluous word.