aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2022-05-21X11: Use cursor themesDavid Robillard2-29/+42
This changes to getting cursors by name from the cursor theme, which makes the cursor match the ones used in modern desktop environments. As far as I can tell, there is no real standard for names, these ones seem to work for me in GNOME, KDE, and Xfce. I am not sure about the compatibility concerns here, but X11 without Xcursor themes strikes me as either too esoteric or too ancient to worry about, especially since cursor switching isn't critical functionality anyway.
2022-05-21Avoid setting cursor on realizationDavid Robillard1-4/+0
This avoids issues when the default X11 cursor isn't the expected "default" of the environment, for example with Plasma. A real application that changes the cursor needs to do so consistently on mouse enter and leave events anyway.
2022-05-21Set a title for all test windowsDavid Robillard5-0/+6
2022-05-21Fix build of examples that use a stub backendDavid Robillard1-3/+21
2022-05-20Windows: Set window class on local moduleDavid Robillard1-2/+10
This avoids potential clashes between multiple copies of Pugl statically compiled into several modules.
2022-05-20Add missing license metadataDavid Robillard1-1/+1
2022-05-20Use consistent class names and titles in tests and examplesDavid Robillard26-32/+32
2022-05-20MacOS: Build examples as application bundlesDavid Robillard23-74/+313
This is required on MacOS to make the examples usable. When run as bare programs, they don't show up as normal windows or receive keyboard input.
2022-05-03Fix crash when destroying OpenGL views that haven't been realizedJean Pierre Cimalando5-1/+72
2022-04-23Put unit tests in a "unit" suiteDavid Robillard1-4/+8
This enables running them without the data tests (which can be annoying while working in a messy repo), and for bonus points makes the log output look more uniform.
2022-04-23Fix IWYU warningsDavid Robillard5-16/+9
I suspect that using the same configuration across both C and C++ is starting to wear a bit thin, but this will do for now.
2022-04-23Relax redisplay test to pass on MacOS 11.6David Robillard1-4/+6
Since upgrading to 11.6 (on an Intel Macbook), this test no longer seems to pass. It's unfortunate to not test that small redisplay requests only result in small exposures, but I don't think the previous strict check reflects reality. Exposing more than the application requested, for whatever reason, is a natural part of window environments, so I don't know if this is something that can be reliably unit tested.
2022-04-23Add descriptive verbose output to test_redisplayDavid Robillard1-8/+21
2022-04-23Move reserved platform defines from code to build systemDavid Robillard8-22/+10
Numerous things warn about this, and it's generally a bad idea to put these in the code since it can result in incompatibly compiled code being linked together. Unfortunately this makes building manually (without the build system) more fiddly, but such is life.
2022-04-23Suppress warnings when building with clang on WindowsDavid Robillard2-0/+8
2022-04-23Build C++ components as C++14David Robillard1-1/+1
2022-04-23Windows: Remove redundant view size assignmentDavid Robillard1-5/+0
2022-04-23Windows: Avoid initialization warningDavid Robillard1-1/+2
2022-04-23Windows: Remove pointless const qualifiersDavid Robillard1-4/+1
2022-04-23Windows: Avoid else after returnDavid Robillard2-5/+15
2022-04-23Strengthen MSVC warningsDavid Robillard3-6/+4
2022-04-21Fix MacOS buildDavid Robillard1-0/+6
2022-04-21Update READMEDavid Robillard1-3/+7
2022-04-21Improve error handlingDavid Robillard9-79/+140
2022-04-21Remove unused return type from backend destroy methodsDavid Robillard11-35/+24
Since this is essentially a destructor, I don't think there's anything really useful to do with errors here, and in practice no backends actually used it anyway.
2022-04-21Move attribute definitions to a separate headerDavid Robillard4-12/+21
2022-04-21Fix private include guardsDavid Robillard5-15/+15
2022-03-14Fix warning in VS2019David Robillard1-1/+3
2022-03-14Fix documentation markupDavid Robillard1-1/+1
2022-03-14Fix build on systems without a "python" executableDavid Robillard1-1/+1
This script is technically 2/3 compatible, but 3 is required to build anyway, so whatever.
2022-03-14Suppress warnings in MinGWDavid Robillard1-0/+6
2022-03-14Make C++ compiler optionalDavid Robillard1-2/+3
2021-12-17Remove unused struct definitionDavid Robillard1-4/+0
2021-12-17Reduce variable scopeDavid Robillard1-2/+2
2021-12-17Pass const references where appropriateDavid Robillard2-10/+11
2021-12-17Remove redundant virtual qualifierDavid Robillard1-1/+1
2021-12-17Adopt REUSE machine-readable licensing standardDavid Robillard97-1086/+385
See https://reuse.software/ for details.
2021-12-17Suppress new warnings in clang-tidy 13David Robillard6-5/+8
2021-12-17Remove unnecessary includeDavid Robillard1-1/+0
2021-12-17Fix spelling errorsDavid Robillard2-5/+5
2021-12-17Windows: Support extended mouse buttonsDavid Robillard1-0/+14
2021-12-17Make button numbers consistent across platformsDavid Robillard4-8/+30
There's no universal consensus on how buttons are numbered. Left, right, middle as 0, 1, 2 seems to be the most common convention on modern vaguely similar libraries, so I've gone with that. The switch to zero-based indices will obviously break all current client code. Particularly since now is the time to finish any breaking changes before a stable release, I think that is better than only changing the middle and right numbers, which would likely go unnoticed.
2021-12-17Call glXQueryDrawable() from within the GLX contextDavid Robillard1-5/+8
This fixes getting the PUGL_SWAP_INTERVAL hint on some NVidia drivers.
2021-12-17Explicitly check for supported GLX extensionsDavid Robillard1-11/+24
2021-12-16Add puglGetBackend()David Robillard2-0/+10
2021-12-16Add puglGetClassName()David Robillard2-0/+11
2021-12-16Add puglGetWindowTitle()David Robillard2-0/+11
2021-12-16Add puglGetParentWindow()David Robillard2-0/+11
2021-12-16Add puglGetTransientParent()David Robillard2-0/+16
2021-12-16Rename puglSetTransientFor to puglSetTransientParentDavid Robillard6-11/+23