Commit Graph

73519 Commits

Author SHA1 Message Date
Cheng
5fd97439ac Tag 3.2.4 release
-----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQQx+vLQdOwioQqkxtoG6kHeT2wehgUCZUveAAAKCRAG6kHeT2we
 hqGvAJ4xwiuzo/2mC21LCwXfXWUNQhkbHwCggNaBHRpdkQUuMwR9ww+MZgPEo3Q=
 =+jIB
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQrn/q7Kf8Gjabp35dXHDqcO55vygUCZdBUxwAKCRBXHDqcO55v
 yukHAQCiQvJW1HCUzPuibo1xvPhAkv7AYgy+XTYo7kHfdbsYhQEAqYFIzW1Vzh4d
 pBbyYn74FhD1U3UxBNX7v/ZU0PjjkQw=
 =xHwQ
 -----END PGP SIGNATURE-----

Merge tag 'v3.2.4' into rho-fork

Tag 3.2.4 release

# -----BEGIN PGP SIGNATURE-----
#
# iF0EABECAB0WIQQx+vLQdOwioQqkxtoG6kHeT2wehgUCZUveAAAKCRAG6kHeT2we
# hqGvAJ4xwiuzo/2mC21LCwXfXWUNQhkbHwCggNaBHRpdkQUuMwR9ww+MZgPEo3Q=
# =+jIB
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu Nov  9 05:14:08 2023 EAST
# gpg:                using DSA key 31FAF2D074EC22A10AA4C6DA06EA41DE4F6C1E86
# gpg: Can't check signature: No public key
2024-02-17 16:40:06 +10:00
Cheng
a3dcbd618e
prep for merging v3.2.4 2024-02-17 16:38:46 +10:00
Vadim Zeitlin
085a136dcb Update distribution-related files for 3.2.4 release
Update the change log, announcement etc.
2023-11-08 02:08:21 +01:00
Vadim Zeitlin
f3bfd94bbf Fix crash in wxAuiNotebook after dragging a page
Fix using outdated click position in wxAuiTabCtrl mouse handlers, which
resulted in an invalid wxEVT_AUINOTEBOOK_DRAG_MOTION event being
generated and a crash while handling it.

Ensure that we reset m_clickPt when resetting m_isDragging too so that
we don't decide that we're dragging if the mouse enters the window with
the left button already pressed after a previous drag.

See #24027, #24039.

(cherry picked from commit f1a3816cd9da0c3c7ceebe9735d37fb2d3158388)
2023-11-07 15:14:42 +01:00
Vadim Zeitlin
4fab20cca1 Return true from AddCatalog() if message ID matches language
When the original messages language matches the language of the locale
being used, these strings can be used directly and so AddCatalog()
should still return true for them but it didn't do it any more after the
changes of 94b1a17aeb (Add AddAvailableCatalog() and use it in
AddStdCatalog(), 2023-09-30).

See #18227.

Closes #24019.

Closes #24037.

(cherry picked from commit 39079cbf237e1a93a2acd97280cc2845a811f819)
2023-11-07 15:13:31 +01:00
Lotendan
425d9455e8 Add support for initializer_list to wx dynamic arrays
While these array classes are deprecated in the user code, they're still
used, for compatibility, in many places in wxWidgets API and allowing to
create them from initializer_list makes using it more ergonomic as it's
now possible to just pass an initializer list of items to fill the
control with, for example, instead of appending them one by one.

This is the equivalent of 4d62df488b (Add support for initializer_list
to wx dynamic arrays, 2023-03-02) from master.

See #23309.

Closes #23966.
2023-11-07 02:23:58 +01:00
Vadim Zeitlin
a87c857fcc Merge branch '3.2-egl-fixes' into 3.2
Backport wxGLCanvas fixes from master fixing regressions in 3.2.3.

See #24018.
2023-11-06 17:23:41 +01:00
Vadim Zeitlin
cc99018289 Fix a link in the installation documentation
Using quotes isn't needed and doesn't seem seem to work here.

(cherry picked from commit 1830c375506e3fb7d48a0d1f4c02f7d87989cd9e)
2023-11-04 14:31:36 +01:00
Joan Bruguera Micó
264c499375 Undo wxGLCanvas::SwapBuffers() Wayland frame sync.
This reverts the frame synchronization logic that was recently added
with the purpose of avoiding performance issues due to `eglSwapBuffers`
blocking when the canvas is hidden or occluded.

This logic should be unnecessary after `eglSwapInterval(display, 0)`
is called, since `eglSwapBuffers` should never block anymore.
Furthermore, as it stands now, it causes the canvas to continuously
repaint itself at the refresh rate of the display, which is wasteful
for applications which do not need to continuously refresh.

See #24012, #24017.

(cherry picked from commit abfdd186ff540e62d18ef3e3d37ce2015843309a)
2023-10-30 00:49:12 +01:00
Stefan Csomor
3586813817 Fix showing windows for background apps under macOS Sonoma
Change implementation to use Sonoma-supported version of the application
activation call.

See #23893, #24003.

(cherry picked from commit 695ca042895468a8ce6c1a84422882adb3c63ee9)
2023-10-30 00:49:12 +01:00
Joan Bruguera Micó
238dd2a8ea Ignore spurious map-events on Wayland's wxGLCanvasEGL
In the recent changes for handling map/unmap events on Wayland's
wxGLCanvasEGL, we use the following GTK widget signals:
* The "map-event" signal to create the canvas's subsurface.
  The earlier "map" signal can not be used, as the associated toplevel
  window's Wayland surface may not yet exist by the time we receive it.
* The "unmap" signal to destroy the canvas's subsurface.
  Using the later "unmap-event" signal is problematic, due to other
  resources we build upon being already destroyed by then.

Usually, the "map-event" signal comes before "unmap" and resources are
created and destroyed appropriately. However, there's an edge case:
If a canvas is shown and then immediately hidden (before wxWidgets can
pump from the event loop), "unmap" will come before "map-event".
This happens because signals like "map" and "unmap" are delivered
immediately (when calling e.g. `gtk_widget_hide`), while signals like
"map-event" and "unmap-event" are delivered later on the event loop.

For the same reason, showing a canvas, then immediately hiding it, then
immediately showing it again, will cause two "map-event"s to get
delivered enqueued without a "unmap" in between.

This condition can be hit quite easily when setting up a complex UIs,
and in particular it is triggered by Aegisub during startup, leading to
a crash (Wayland protocol error) when opening a video later, or when
specifying a video directly on the startup command line.

To avoid this breaking our resource management, add some checks to detect
those "map-event"s we shouldn't handle - either the ones that happen
after "unmap", or the duplicate ones without an "unmap" in between.

See #23961, #23968.

(cherry picked from commit 133f7731b25df46bd99519e7c52cf4a90ca2cc1a)
2023-10-30 00:49:12 +01:00
Joan Bruguera Micó
3d235b8da6 Clean up Wayland resources on wxGLCanvas destructor
If the wxGLCanvas is destroyed immediately (without hiding it first),
the GTKs widget's `unmap` signal which usually destroys the Wayland
resources is not emitted. Thus, we need to ensure they are destroyed
on the destructor instead.

This fixes an use-after-free issue, sometimes causing a crash, because
one of the leaked resources is the canvas's Wayland frame callback.

See #24013, #24016.

(cherry picked from commit 22ae7a58b5412463194b446426296b588368bff8)
2023-10-30 00:49:12 +01:00
Vadim Zeitlin
45ac25826b Ensure that we call eglSwapInterval() for the correct context
Calling it from the frame callback might change the swap interval for
the wrong context if the active context got changed in the meanwhile,
but by the time SwapBuffers() is called the correct context must be set.

Doing it there also allows to unify X11 and Wayland code branches.

See #24014.

(cherry picked from commit 64afa9d96341f3696ba5311d36fd3a82f7c9de77)
2023-10-30 00:49:12 +01:00
Vadim Zeitlin
414faff190 Show the window in wxGLCanvasEGL tracing messages
This is useful when there is more than one window using EGL.

(cherry picked from commit 547fb15c51b43b9486c6c5422a60a27fbf53eb43)
2023-10-30 00:49:12 +01:00
Vadim Zeitlin
c4612cd1b9 Fix wxGLCanvasEGL::IsShownOnScreen() under Wayland
Don't use m_readyToDraw in it, as the canvas is still shown even when
it's not ready to draw yet, and use m_wlSubsurface instead as it is
destroyed when the window is unmapped.

See #23899.

(cherry picked from commit cf44a87ec62f9cefb428b8d6c002c2ee342dc4ec)
2023-10-30 00:49:12 +01:00
Vadim Zeitlin
7df5cf53f4 Handle all cases in switch instead of using "default"
No real changes, just clean up the code a bit to make sure we get a
-Wswitch if any elements are added to wxDisplayType enum in the future.

(cherry picked from commit d128afe1e8fff6fbd16c46ffbe30eaba706ff274)
2023-10-30 00:49:12 +01:00
Vadim Zeitlin
79aac7a626 Document wxGTK regression fix for console apps linked with GUI
This is rather important to mention in the change log.
2023-10-23 02:00:25 +02:00
Vadim Zeitlin
c816229fc3 Fix losing the other selection contents in wxClipboard
The memory leak fix in b52728a62a (Fix memory leak of wxClipboard data
on exit, 2023-06-21) was too eager and destroyed not just the currently
used selection (e.g. primary), but also the other one (secondary) when
Clear() was called, which was wrong and resulted in the loss of
clipboard contents when discarding the primary selection in wxSTC, for
example.

Fix this by only deleting the object corresponding to the selection
which we're clearing.

See #23661, #23988.

(cherry picked from commit dc6a0c069bdde714f22cb0459efd9ad186ce7179)
2023-10-23 01:57:13 +02:00
Vadim Zeitlin
0b0437af20 Fix refreshing wxGenericListCtrl with multiple selection
Changing the selection could behave wrongly and result in an assert
failure as the selection anchor could have become invalid, due to the
change of the number of items in the control.

Fix this by invalidating it when this happens.

(cherry picked from commit 5885eea5ea72434311f2c706f57cff92a09ade91)
2023-10-23 01:57:13 +02:00
Vadim Zeitlin
cf66599eba Avoid spurious memory leak reports from static MSVC CRT
The leak check is done before the FlsAlloc()-installed callback function
runs in this build variant and so reports wxThreadSpecificInfo object,
and everything it contains, as leaked, even if it isn't, really, so
deallocate it explicitly ourselves in this case.

Also call wxThreadSpecificInfoTLS::CleanUp() from the main thread as
well, which fixes a possible real (albeit one-time only, so not really)
memory leak under XP where FLS API is not available.
2023-10-23 01:57:13 +02:00
Vadim Zeitlin
3f7660f6c1 Remove redundant "const" from wxItemId conversion operator
This "const" is ignored and just results in a warning from MSVS 17.6.

See #23590.

(cherry picked from commit 946aa6bbc430302265aea41754c13729f931edf4)
2023-10-23 01:57:13 +02:00
Vadim Zeitlin
b6e9e37e54 Merge branch 'update-3.2.4' into 3.2
Update version to 3.2.4.
2023-10-23 01:56:39 +02:00
Paul Cornett
1444565855 Avoid crash with GTK3 if console program is linked to GUI library
A console program should not really be linked with the GUI library, but it used
to work, and it's unavoidable with the monolithic build, so fix the regression.
See #23981

(cherry picked from commit 4cabfa111ab5912ae30d6d44b917a9c403845b3f)
2023-10-21 10:22:37 -07:00
Cheng
73809b8550
Oops, correction.
Samples fail to utilize the manifest.
wxWidgets bug, if they could not fix it,
neither can I.  Maybe it will work in codelite
2023-10-15 11:43:02 +10:00
Cheng
01d9a0d35c
oops, neglected to include no end of v3.2.2.1 files 2023-10-15 10:13:45 +10:00
Cheng
c14f1bc55b
Putting utf8 back in the wxWidgets manifests,
Samples now support utf8 by default
without any further modification.

So why do I have to include a manifest file
explicitly?
2023-10-15 08:53:36 +10:00
Paul Cornett
5560e59330 Build fix for wxUSE_DATETIME==0
(backport of 642f226eb67dae12fd408c2c198c236b3cde5f9f)
2023-10-14 11:52:09 -07:00
Paul Cornett
744d7b8c09 Fix memory leak in wxBitmap with GTK3
Introduced in f7247086c2 (Fix storing wxBitmap data in GdkPixbuf, 2019-09-18)

(cherry picked from commit 7fbe3698c5e3eb89693e8a4e9f54e7f89d69ec87)
2023-10-14 11:51:41 -07:00
Vadim Zeitlin
30f00b81f4 Improve instructions for updating the change log
And add a section for 3.2.4 to it.
2023-10-10 16:11:14 +02:00
Vadim Zeitlin
61beda2a9e Update version to 3.2.4
Run ./misc/scripts/inc_release, bakefile and autoconf.
2023-10-10 16:02:59 +02:00
Vadim Zeitlin
1631d97816 Add a reminder to review libtool version info before the release
It would have been better to do it before 3.2.3 rather than after, but
still better to do it before 3.2.4 than never.
2023-10-10 15:57:14 +02:00
Vadim Zeitlin
df14ec7308 Mention that the final release tag must be of the form vX.Y.Z
Otherwise the Ruby script updating the release statistics would fail.
2023-10-10 15:53:04 +02:00
Vadim Zeitlin
cc7fefd9f1 Update 3.2.3 release check sums
Also mention that MinGW-gcc 13.2.0 binaries are available now.
2023-10-09 21:00:45 +02:00
Vadim Zeitlin
015e120fa8 Install Doxygen in MSW part of make_release workflow
Somehow it's not available by default any longer.
2023-10-07 16:28:50 +02:00
Vadim Zeitlin
ffb9f2e035 Propagate the changes from README to the announcement too
This was forgotten in the last commit.
2023-10-07 16:20:10 +02:00
Vadim Zeitlin
c5114b80fb Update release documentation for 3.2.3
Update the changes section in the README/announcement and the version
number and date everywhere.
2023-10-07 15:31:08 +02:00
Vadim Zeitlin
c55c478965 Fix recently introduced use of nullptr in wxGenericListCtrl
Correct the too hastily backported change of cb69e76897 (Fix not
refreshing generic wxListCtrl after deleting last item, 2023-10-06)
and use NULL instead of nullptr in this branch.
2023-10-07 15:22:40 +02:00
Vadim Zeitlin
ee8dfc6267 Document that wxLogInterposerTemp shouldn't be used
Mark it as deprecated in the documentation without deprecating it
formally in the code, as it seems to be used in some existing code and
there is no urgency to remove it, but using it in new code still doesn't
make any sense.

See #23945.

(cherry picked from commit 543fd3fabcb6d88a6e220520c41501c3f961dd55)
2023-10-06 19:11:38 +02:00
Vadim Zeitlin
cb69e76897 Fix not refreshing generic wxListCtrl after deleting last item
The check for the line being deleted being in the visible range
prevented us from refreshing anything at all if the line which was just
deleted was the last line of the control.

(cherry picked from commit 8d036af8160d303b67944d781d27ff58b058f839)
2023-10-06 19:11:31 +02:00
Vadim Zeitlin
20d4f2fb43 Fix using *.* and similar patterns in wxDir under MSW
These patterns are supposed to match all files and not only files with
extensions, but our own code only matched the latter.

Switch to using shell PathMatchSpec() function to check for matching
instead to use the usual Windows rules.

See #23905, #23910.

(cherry picked from commit a4d2e36cec16d511e461496f3eecbcb6f3e7343b)
2023-10-06 17:16:49 +02:00
Vadim Zeitlin
d178223745 Add AddAvailableCatalog() and use it in AddStdCatalog()
The new function only returns true if the catalog could be really
loaded and not if it is considered not to be needed because the message
ID language (which is typically "en-US") happens to be present in the
preferred UI languages list (which seems to always include "en-US" in at
least Western European MSW).

This allows to distinguish, albeit in a rather awkward (but
backwards-compatible) way between having a translation for the given
language and not needed such translation.

It is still not clear if it is really correct to return "en-US" from the
list of preferred languages even if the user has never intentionally
configured the OS to indicate that English is acceptable, but at least
now we can work around this issue and use AddAvailableCatalog() in
AddStdCatalog() to make sure we only skip loading unversioned wxstd.mo
if the versioned wxstd-x.y.mo file is really found instead of never
doing it, as was the case until now (see #23886).

Also add GetBestAvailableTranslation() helper which seems more useful
than the existing GetBestTranslation() one and is similarly related to
it.

See #18227, #23930.

(cherry picked from commit 94b1a17aeb12a1ec723a255089be16cd31a268a2)
2023-10-06 15:42:15 +02:00
Maarten Bent
cbf081db91 CMake: fix RegularExpression::compile errors
When the wxWidgets sources are in a path containing '++', CMake would
show errors on the command line:

[cmake] RegularExpression::compile(): Nested *?+.
[cmake] RegularExpression::compile(): Error in compile

This happens because the full path was interpreted as a regular
expression when creating the source_groups. Without wxSOURCE_DIR the
regular expressions still match and create correct source groups, so
remove it.

See #22738, #23943.

(cherry picked from commit b9b0724de141696edf817fb032aa51daf699b48b)
2023-10-06 01:11:13 +02:00
charvey2718
e30a6a3828 Fix bug with "pass through" mouse events from MSW wxFileDialog
Remove any remaining mouse messages from the input queue after showing
the file dialog because they somehow remain after it is destroyed and
could be processed by the application once wxFileDialog::ShowModal()
returns, resulting in phantom events being processed by the controls
that just happen to be under the button of the file dialog that was
clicked to close it.

See #10924, #23944.

(cherry picked from commit ffc99bd487731629308af9af79205003b7d7e3b0)
2023-10-06 01:11:13 +02:00
Cheng
71d2e28c0b
oops, need to recurse through submodules 2023-10-05 18:26:31 +10:00
Cheng
145591d2c1
Merge tag 'v3.2.2-to-rho-fork' into rho-fork 2023-10-05 18:22:30 +10:00
Cheng
e5f0e632b1
patch file that patches patch file leads to recursion issues 2023-10-05 18:13:49 +10:00
Cheng
f64ce9dec2
patched 3.2.2 to compliance with
rho fork, but does not yet have rho-fork history
2023-10-05 18:03:59 +10:00
Vadim Zeitlin
ed002d3b58 Fix wxComboCtrl popup behaviour under some Wayland compositors
We need to set the window type hint to COMBO in order to use a popup
window for it under Wayland and while not doing it seems to still work
with GNOME/mutter, it is required with the other compositors such as KDE
Plasma or Sway and doesn't seem to do any harm under GNOME, so do it
always and hope that it doesn't result in any problems with not
combobox-like popups.

This basically undoes 62d934aab8 (Don't set HINT_COMBO as wxPopupWindow
is used for different windows as well, 2008-10-07).

See #23931, #23908.

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>

(cherry picked from commit 5c0cc72cb838371a823e2469a044a4cf92fb6a5f)
2023-10-04 18:42:21 +02:00
Vadim Zeitlin
78203cd889 Ensure we have "+" button when adding children to wxTreeCtrl item
The control doesn't update the button itself, even in the recent Windows
versions, so do it ourselves.

It might be better to use I_CHILDRENCALLBACK and handle TVN_GETDISPINFO,
but this looks like a safer change, so do this for now.

See #23718, #23734.

(cherry picked from commit 3ed273ce98083e2e9c81bfb550a68ed4b322ae88)
2023-10-04 18:40:46 +02:00
Vadim Zeitlin
8de60c856f Ensure we don't crash when checking for cancelling print job
Don't dereference sm_abortWindow without checking that it is non-null in
wxAbortProc(): even though it's not supposed to happen, it still somehow
does, apparently, so just log a debug message instead of crashing in
this case.

See #23927.

(cherry picked from commit 9a728192c4340b34d2509898f7f16b767a794ac9)
2023-10-04 02:48:21 +02:00