Unfortunately the workaround in dce09c9b2a (Avoid crash on startup in
webvew sample under Wayland, 2024-04-22) broke the sample when using CEF
as we can't capture the local lambda by reference.
Fix this simply by making a copy of it instead -- this is not the most
efficient way to do it, but it doesn't really matter here and it's the
simplest one.
The changes in 66076afb6f (Fix creating controls on startup in the
widgets sample under Mac, 2024-05-15) used IsClientAreaChild()
incorrectly, it should be called on the parent object and not negated.
See #24528, #24529.
Closes#24568.
Closes#24569.
This got broken by a8b4753d1d (Reconnect events to the widget after
recreating it in the sample, 2024-02-18) because checking whether the
children list is empty doesn't work correctly in wxOSX (and wxUniv)
because scrollbars may be present in this list even if there are no
other children yet.
Fix this by checking if we have any "real" children explicitly.
Closes#24528.
Closes#24529.
The purpose of this class was unclear as only TextEditDocument, deriving
from it, was actually used, so it seems like we can just rename it to
TextEditDocument and use a single class instead of using two without
losing anything.
The workaround for wxWebViewChromium added in f5e2af9a28 (Make
wxWebViewChromium work with wxGTK3 and X11, 2023-09-02) broke
wxWebViewWebKit under Wayland as calling wxYield() inside
wxEVT_WEBVIEW_CREATED handler results in
Error flushing display: Resource temporarily unavailable
error from GTK and immediate application exit.
This is almost certainly a GTK bug and should be fixed there, see
https://gitlab.gnome.org/GNOME/gtk/-/issues/124, but for now make the
workaround even uglier to avoid it.
Attempting to change the style or alignment of the spin controls in the
widgets sample made the sample crash. This was caused by a8b4753
(Reconnect events to the widget after recreating it in the sample,
2024-02-19) which resulted in using windows that were previously
destroyed.
Fix this by calling NotifyWidgetRecreation() for each spin control only
after they were all recreated.
Closes#24487.
Allow the application to override the default system mode and,
incidentally, also to provide a more portable way of enabling dark mode
under MSW.
Show how to use the new function in the drawing sample.
Closes#19185.
Closes#23867.
Include this header explicitly in the sample instead of relying on its
indirect inclusion from wx/filepicker.h or wx/dirpicker.h respectively.
No changes yet, but this will become important once wx/gtk/filepicker.h
doesn't include wx/button.h any longer.
The claimed advantages of cresting it on demand don't really apply to
the sample, so don't do it like this, but create the object directly to
make it easier to customize the creation flags.
Still make it possible to test the on-demand creation by predefining
WX_CONFIG_CREATE_ON_DEMAND environment variable, this is simpler than
telling people to uncomment some lines in the sample code.
Add a menu item to switch between using the clipboard and primary
selections.
This finally makes UsePrimarySelection() call in the sample useful,
after 25 years when it didn't do anything, since it was added back in
7e2c43b855 (...Added for primary selection to sample/text., 1999-06-10)
The call actually did nothing, but the comment implied that it did, as
if the default argument to UsePrimarySelection() were "true" -- which is
not, and never has been, the case.
Reduce confusion by clarifying what's going on here and passing an
explicit argument.
Factor out the call to UsePrimarySelection() and accompanying comment in
its own function.
This doesn't make much sense yet, but will allow to avoid modifying two
copies of this code and comment in the upcoming commits.
No real changes yet.
On all platforms, except macOS, the reason why a notification was
dismissed is known. Specifically, it can be useful to distinguish whether
the notification closed because of a timeout, or a click by the user.
Currently only implemented for the macOS backend.
Also change this backend to not use persistent storage by default
be consistent with the other backends, that don't support persistent
storage at all yet.
Fixes: #23743Closes#24407.
And get rid of SAMPLES_RPATH_FLAG and just use DYLIB_RPATH_FLAG, as it's
not at all sample-specific.
This notably allows running wxrc from the build tree without setting
LD_LIBRARY_PATH under Linux.
Closes#24384.
Use correct content type when creating binary secrets to prevent
libsecret from munging them.
Also update the sample to show more functionality.
Closes#24351.
Closes#24352.
No real changes, just rebake all the makefiles after the addition of
wxwin.extraLdflags, which results in an extra space even when these
flags are empty in webview-chromium branch.
This should have been done in f37401dde3 (Merge branch
'webview-chromium', 2024-01-19)
This ensures that the expected events are given even after the widget is
recreated due to a change of some controls on its page (and not because
it's recreated by one of the menu commands in the parent frame).
We also don't need to connect to these events from WidgetsFrame any
longer (and, in fact, doing it would be wrong as we'd connect twice),
which simplifies its code.
No real changes, just move the function connecting to the widget events
from WidgetsFrame to WidgetsApp to allow reusing it from outside
WidgetsFrame in the next commit.