Commit Graph

79609 Commits

Author SHA1 Message Date
Vadim Zeitlin
1bfece511d Ignore commit changing naming convention in wxAUI when blaming
It touched a lot of lines but didn't make any real changes.

Also add a date which was missing for another commit in this file for
some reason.
2026-02-24 23:50:20 +01:00
Vadim Zeitlin
84236e8bed Fold common code for right/middle button clicks in wxAuiToolBar
No real changes, this is a pure refactoring after the changes of the
parent commit which resolved another inconsistency in handling of right
and middle mouse button clicks.
2026-02-24 23:49:40 +01:00
Vadim Zeitlin
55a84f4696 Generate wxEVT_AUITOOLBAR_MIDDLE_CLICK when not on normal item
There doesn't seem to be any reason to generate right click events in
any case, whether there is an item under the mouse or not, but only
generate middle clicks if there is a normal (and not any other kind of)
item under the mouse.

Change the code to also do it unconditionally for consistency.
2026-02-24 23:46:39 +01:00
Vadim Zeitlin
68b689f85b Don't push/pop event handlers for showing popup menu
Just use GetPopupMenuSelectionFromUser() which handles this internally.

Also document that ShowDropDown() returns -1 if the menu is dismissed.

No real changes.
2026-02-24 23:44:29 +01:00
Vadim Zeitlin
960b815e02 Replace another wxRect whose position is not used with wxSize
No real changes.
2026-02-24 23:39:02 +01:00
Vadim Zeitlin
8b0f92e62d Remove unused wxRect variables in wxAuiToolBar mouse handlers
No real changes.
2026-02-24 23:38:17 +01:00
Vadim Zeitlin
1b840d974d Don't duplicate same code twice in wxAuiToolBar::OnRightUp()
For unknown reasons we used exactly the same code for sending event with
valid and invalid tool ID instead of just setting a variable containing
the tool ID and then using it.

Fix this now.

No real changes.
2026-02-24 23:35:22 +01:00
Vadim Zeitlin
1806e40a45 Only call wxGetMouseState() in wxAuiToolBar code
Don't call wxGetMousePosition() when this information is already
available as part of wxGetMouseState() return value that we may need
anyhow.

No real changes.
2026-02-24 23:28:27 +01:00
Vadim Zeitlin
f07e3d169e Use wxRect::Contains() overload taking wxPoint
This is shorter and arguably more clear than passing pairs of
coordinates everywhere, so change the code to consistently do it.

Also remove unnecessary temporary variables.

No real changes.
2026-02-24 23:26:29 +01:00
Vadim Zeitlin
3e07039934 Simplify wxAuiToolBar::GetOverflowRect()
Don't call m_overflowSizerItem->GetRect() unnecessarily: all fields of
overflow_rect were overwritten immediately after assigning the result of
this call to it, so this was just useless.

Also replace "cli_rect" with "cli_size" as we only used the size part
anyhow.

No real changes.
2026-02-24 23:22:00 +01:00
Vadim Zeitlin
00ebfc9275 Fix handling right and middle clicks in vertical wxAuiToolBar
They were wrongly recognized as clicks on the overflow item due to the
hit test check being correct for horizontal toolbars only.

Fix this by using the same, simpler and much more obviously correct,
check that was already used for the left mouse button and just tests if
GetOverflowRect() contains the point.

Closes #26242.
2026-02-24 23:18:40 +01:00
mcorino
d0405788c2 Allow passing null config to wxHtmlHelpWindow::UseConfig()
Null argument is allowed in wxHtmlHelpController::ReadCustomization()
and is potentially useful here to prevent the use of a dangling pointer.

Also explicitly document that this parameter can be null.

Closes #26238.
2026-02-24 16:49:05 +01:00
Randalphwa
c90aaa3d09 Fix handling of "%s" in vararg functions in some UTF-8 builds
When wxUSE_UNICODE_UTF8 is set to 1, strings use UTF-8 and are still
char strings and not wchar_t ones, but when using wx own implementation
of vsnprintf(), "%s" expected a wide string and not a normal one.

Fix this at wxPrintfFormatConverterUtf8 level.

Closes #26236.
2026-02-24 15:42:11 +01:00
Vadim Zeitlin
5d0281ebd0 Scale wxAuiToolBar packing, padding and margins by DPI factor
Store these values in DIPs internally and apply FromDIP() when using
them.

This is simpler and possibly more precise than rescaling them when
getting wxEVT_DPI_CHANGED event and the only awkward part is that we
need to use ToDIP() in the setter functions, but this is arguably not
very important as these functions are hardly ever used anyhow.

See #26235.

Closes #26076.
2026-02-24 15:39:09 +01:00
Vadim Zeitlin
d9fa578f22 Merge branch 'improve-sizer-debugging'
Miscellaneous small changes to help with debugging sizer layout.

See #26234.
2026-02-24 15:38:18 +01:00
Vadim Zeitlin
9fa5d02bdc Improve debug output from sizer debugging code
Make it more readable by indenting it according to the nesting level and
also showing virtual size only if it's different from the actual size,
as otherwise it is just redundant.

Also don't show maximum size at at all, it's never set anyhow.
2026-02-23 20:25:26 +01:00
Vadim Zeitlin
395d2be7c9 Use range for loop in sizer debugging code
No real changes.
2026-02-23 20:25:26 +01:00
Vadim Zeitlin
1e0b97ab82 Make it easier to enable sizer debugging code
Add wxHAS_SIZER_DEBUG to allow enabling sizer debugging by predefining
this symbol and without necessarily recompiling everything with
wxDEBUG_LEVEL > 1.
2026-02-23 20:25:26 +01:00
Vadim Zeitlin
326a9916ee Add wxDumpSizer() function
This is helpful to call from the debugger to see the information about
the given sizer and its contents.
2026-02-23 20:25:26 +01:00
Vadim Zeitlin
0aaf8a964e Make wxSizerItem::GetRect() const
There is really no reason for it not to be.

There also doesn't seem to be any reason for it to be virtual, but keep
this just to warn any people who override it in their code so that they
could add "const".
2026-02-23 20:25:26 +01:00
Vadim Zeitlin
5a79c2599a Avoid asserts if wxAuiTabFrame::GetLayoutDirection() is called
This may happen when using sizer debugging code which uses wxClientDC
which calls this function on all windows in the hierarchy.
2026-02-23 20:25:26 +01:00
Vadim Zeitlin
3193ce30af Fix building non-GTK ports under Windows with Cairo >= 1.18
Cairo 1.18 broke using cairo_public redefinition hack used before to
avoid declaring Cairo functions as being dll-imported. Use the new way
to prevent this from happening but still define cairo_public when using
older versions.

Note that, unfortunately, we can't do it unconditionally because this
results in a macro redefinition warning with newer versions which is
impossible to disable using gcc.

As the new hack is even worse than the existing one, move it into its
own header to avoid duplicating it in both between src/common/cairo.cpp
and src/generic/graphicc.cpp.

Closes #26224.
2026-02-23 17:46:09 +01:00
Vadim Zeitlin
61300d78d2 Suppress error message from "ln --relative" when installing
We provide a fall back in case of error, so seeing this error in the
build logs is confusing.

This slightly amends the changes of b2cb336b78 (Fix wx-config symlink in
out-of-tree installs, 2024-06-18).

See #24622.
2026-02-23 14:01:04 +01:00
Vadim Zeitlin
6799a11221 Fix autoconf build for macOS < 13
The recent 94a54f68af (Fix script used to change macOS install names
with configure, 2026-02-18) broke it by using realpath not available
until macOS 13.

Return to using (nested) readlink calls.

See #25675, #26200.
2026-02-23 13:50:42 +01:00
Blake-Madden
69d0c4a3ae Edge WebView fixes
Use ICoreWebView2_22::
AddWebResourceRequestedFilterWithRequestSourceKinds() when available
(closes #25816).

Also fix memory file system issues.

Closes #25816.

Closes #26214.
2026-02-23 11:33:40 +01:00
Vadim Zeitlin
8decc76a0a Don't refresh wxAuiToolBar unnecessarily in wxEVT_SIZE handler
wxAuiToolBar gets wxEVT_SIZE events due to relayout done by wxAuiManager
whenever any sash is being dragged, but this doesn't necessarily
actually change its size, so avoid refreshing it in this case, as this
results in very noticeable flicker, especially when the toolbar has any
controls inside it.

This commit is best viewed ignoring whitespace-only changes.

Closes #26142.

Closes #26212.
2026-02-23 11:31:13 +01:00
Vadim Zeitlin
94a54f68af Fix script used to change macOS install names with configure
This is a "forward port" of 31c8641771 (Fix script used to change macOS
install names with configure, 2026-02-18) from 3.2 branch.

See #23143, #25173, #25182, #25675.

Closes #26200.
2026-02-23 11:28:21 +01:00
Vadim Zeitlin
fed72e53a4 Merge branch 'msw-menu-appearance-fixes'
Appearance fixes for wxMSW menus in dark mode.

See #26182.
2026-02-23 11:24:42 +01:00
Bill Su
678382f568 wxScrolled<>: fix testing mouse position in autoscroll zone
wxWindow::GetRect() does not always report client coordinates,
so use wxWindow::GetScreenRect() and wxWindow::ClientToScreen()
to test mouse and autoscroll zone with consistent coordinate
system.

Closes #26226.
2026-02-22 21:46:10 +01:00
Vadim Zeitlin
95f9b074fe Update wxMenuBar background after system colours change
This fixes the problem with the menu items becoming completely invisible
when switching from dark to light mode.

Co-authored-by: Mohmed abdel-fattah <memoarfaa@gmail.com>
Co-authored-by: Maarten Bent <MaartenBent@users.noreply.github.com>
2026-02-22 15:56:03 +01:00
Vadym Hrynchyshyn
876728f6cd Restore wxDataViewCtrl columns view positions
Previously only saving columns positions was implemented, but they were
never restored.

Closes #26222.

Signed-off-by: Vadym Hrynchyshyn <vadimgrn@gmail.com>
2026-02-22 14:01:18 +01:00
Vadim Zeitlin
4f9b9ff2d3 Add a note about rectangle position to wxWindow::GetRect() docs
Explicitly say that the position is relative to the parent for child
windows but display origin for the TLWs.
2026-02-22 13:52:57 +01:00
Vadim Zeitlin
fab7c65eb1 Merge branch 'osx-memory-leaks'
Fix several memory leaks in wxOSX.

See #26215.

Closes #26208.
2026-02-22 13:49:11 +01:00
Stefan Csomor
a2bcc1479c Fix tracking area memory leak 2026-02-21 23:45:27 +01:00
Stefan Csomor
e69aa968d1 Fix memory leak of NSPasteboardItem in wxOSXPasteboard code
Add missing release.
2026-02-21 23:43:32 +01:00
Stefan Csomor
d23d483241 Fix leak of buttons in wxFontDialog
Release buttons after adding them to superview.
2026-02-21 23:43:17 +01:00
Stefan Csomor
985a64f11d Fix memory leaks reported by Xcode Memory Analysis
Mostly just add autorelease to avoid various objects being leaked, but
also add manual calls to release for the code which is not necessarily
executed inside a GUI application and so can't rely on autorelease pool
existence.
2026-02-21 23:41:52 +01:00
Stefan Csomor
b581980bef Fix miscellaneous memory leaks related to synthesized properties
When using @property(retain), we need to reset the pointer to prevent it
from being leaked when the containing object is destroyed.
2026-02-21 23:34:19 +01:00
Stefan Csomor
5e2caa4db9 Remove GC-aware code and fix clip view leak
Remove "GC-aware" code as GC is not supported by the OS any longer.

Fix leak of wxWindow::m_osxClipView by releasing it after adding it as
subview.
2026-02-21 23:32:54 +01:00
Vadim Zeitlin
1528506767 Merge branch 'autoscroll-zone' of github.com:wsu-cb/wxWidgets
Make wxScrolled<> autoscroll region configurable.

See #25978.
2026-02-21 21:23:18 +01:00
Sean Maas
9720f1fdce wxOSX: fix missing axes in wxJoystick
Add code to handle D-pads as X/Y axes, which is the behaviour observed
when using wxJoystick on Linux.

Closes #26216.
2026-02-21 21:19:48 +01:00
Vadim Zeitlin
29e6610a50 Merge branch 'qt-artprov' of github.com:AliKet/wxWidgets
Add wxArtProvider implementation for wxQt.

See #26210.
2026-02-21 20:13:14 +01:00
Carlo Bramini
583d44d6bc Fix undefined reference to cairo_surface_get_device_scale()
This function needs to be loaded dynamically too.

Closes #26218.
2026-02-21 19:59:13 +01:00
Bill Su
673ee930e7 wxScrolled<>: simplify autoscroll zone config API 2026-02-21 00:52:13 -05:00
ali kettab
d8263f8d6d Ignore BitmapBundle::ArtProvider test failing under xvfb with Qt < 5.12 2026-02-20 23:47:56 +01:00
Vadim Zeitlin
4503833fb3 Don't set wxRichToolTip background colour in wxGTK
This makes the tooltip unreadable because using background colours with
alpha channel doesn't work correctly for wxPopupWindow (or, rather,
wxNonOwnedWindow) in wxGTK currently and wxSYS_COLOUR_INFOBK uses alpha
in the default GTK theme.

Closes #26185.
2026-02-20 22:32:41 +01:00
Maarten Bent
aeeae2c065 Update jpeg and zlib submodules
Fix a bug in the last jpeg submodule update, fixes #26197.

And update zlib from v1.3.1 to v1.3.2.

Closes #26199.
2026-02-20 22:30:22 +01:00
Blake-Madden
7a5aeaa159 Prevent wxTextEntryDialog from being resized in unexpected ways
Don't allow shrinking the dialog below its minimum size.

Also don't allow resizing single line entry dialogs vertically at all,
as the extra vertical space would be wasted anyhow and just makes the
dialog look bad.

Closes #25739.

Closes #26213.
2026-02-20 22:00:55 +01:00
Vadim Zeitlin
b0d50ffe91 Add wxGLContext::GetProcAddress()
Implement this function as a trivial wrapper for wglGetProcAddress(),
glXGetProcAddressARB() or eglGetProcAddress() depending on the platform
(currently not implemented for macOS).

Account for the known bug in some Windows OpenGL drivers by checking for
manifestly invalid return values and handling them as null.

Use the new function in wxGL code itself and in the pyramid sample.

Closes #9215.

Closes #26209.
2026-02-20 15:26:58 +01:00
Carlo Bramini
ed0abebb66 Use correct name for Cairo DLL when using Cygwin
Closes #26207.
2026-02-20 15:25:45 +01:00