Age | Commit message (Collapse) | Author | Files | Lines |
|
As far as I can tell, nobody actually cares about this in practice now, and
it's slated for removal anyway.
|
|
I get that these aren't all intended to be universal, but suggesting the
replacement of standard functions with boost ones is completely backwards.
This is what a lack of a pluggable architecture gets you.
|
|
Well, on X11 where I'm running clang-tidy anyway, there may be some stragglers
in the other platform implementations. Appeases the
readability-math-missing-parentheses check added in clang-tidy 19.
|
|
|
|
Appeases the cert-int09-c and readability-enum-initial-value checks added in
clang-tidy 19.
|
|
Again I don't think this is actually a concern, but it appeases clang-tidy.
|
|
As gracefully as possible given the API anyway. I don't think this is an error
case that happens enough to really need transparent error handling, if the
clock doesn't work all is lost anyway.
Appeases cert-err33-c, which started caring about clock_gettime() in clang-tidy
19.
|
|
Apparently clang-format 19 decided to get even worse in this case. The C and
C++ committes really, really should have sorted out this nonsense a decade ago.
|
|
|
|
|
|
|
|
|
|
It turns out that this is flaky for reasons that aren't terribly clear from the
documentation. So, just ignore it, it's not the end of the world if raising
doesn't happen anyway.
|
|
|
|
The internal puglPollWinEvents() abstraction was doing more harm than good.
|
|
|
|
|
|
For consistency with event types (since "obscure" is opposite "expose") and the
upcoming puglObscureRegion().
|
|
|
|
|
|
|
|
The code to find the initial size and position for a view had a lot of
duplication, and was inconsistent between platforms. Flaky positioning and
attempting to center embedded children has historically caused a bunch of
problems in general, particularly since windows can be resized.
So, factor out all the initial size and position code so that the logic is in
one centralized place used by all platforms, and always position embedded
children within their parent at the top/left origin. For top-level windows,
the view is centered on its transient parent or the screen (as before). A new
platform function puglGetAncestorCenter() is used to do this in general code.
Also towards a total separation of position and size, towards support for
Wayland, where applications don't dictate their own positions.
|
|
|
|
|
|
|
|
In general, it's more convenient to have full-width integers as parameters,
since C will promote any arithmetic on smaller types to them anyway. Using
narrow types here, then, doesn't really make anything stricter, just forces an
annoying cast when lots of warnings are enabled, which is likely unchecked.
Better to handle it here, since it's more convenient, and the integer range
checks the compiler can do aren't correct anyway (the max width/height is
intentionally smaller than the max PuglSpan, so it can fit in a signed 16-bit
integer).
|
|
There is API to access the minimum timer resolution, but it seems to always be
1 millisecond, which is also the unit of the MsgWaitForMultipleObjects
parameter, so just avoid the fuss and hardcode this as the minimum.
This should slightly reduce overhead when the main loop is running without much
of a margin until the frame needs to be drawn.
|
|
|
|
These could be combined into a hint-like general get/set mechanism, but
currently there's only two window relationships and no immediate plans to add
more, so that feels a bit over-engineered. So, just rename for consistency
with puglSetTransientParent().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This isn't a strict enumeration anyway, so a sentinel value does no harm, and
using it avoids warnings about testing an enum with no zero value.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This just happens to be the factor that results in one tick of a conventional
mouse wheel being a change of 1.0 "lines" as on other platforms (at least for
me, hopefully everywhere). Moving a wheel quickly does result in quite a lot
of acceleration on MacOS though, so more refinement might be needed here for
consistent event handling across platforms.
|