Restore the correct message which was erroneously modified by the
changes of 4f4c5fcfdf (Use nullptr instead of NULL in the code and
documentation, 2022-10-16).
This got broken by the addition of GTKAllowDiagnosticsControl() in
8af645ed22 (Fix crash when using wxNotebook with glib 2.73 or later,
2022-08-29) as not calling it resulted not only in preventing wx code
from installing its own log function implicitly, but also prevented
explicit calls to GTKSuppressDiagnostics() from working neither.
Fix this by calling GTKAllowDiagnosticsControl() automatically from
GTKSuppressDiagnostics() itself.
Improve consistency of checkboxes in wxListCtrl between virtual and
report mode, and between the generic and MSW implementation, see #23869.
Also disable WS_EX_COMPOSITED for virtual wxListCtrl because it
generates an endless stream of cache events, see #23878.
See #23890.
wxAUI has a special window "wxTabFrame" for which GetHandle() returns nullptr.
This is a problem because this commit 3c68696 (Make wxTopLevelWindow::SetSizeHints()
work in wxQt) doesn't account for the rare situation in which a wxWindow is actually
created without the underlying handle, resulting in a crash when we try to call
Set{Min,Max}Size() for this type of windows.
Closes#23920.
Override Set{Min,Max}Size and DoSetSizeHints() to pass size information
to Qt: setting min/max widget size at the wxWidgets level is not enough
to take effect unless the information is also set at the Qt level.
Closes#23917.
When calling wxSimplebook::ChangeSelection(), the focus remained on the
previous, now hidden, page, unless it was explicitly set to one of the
controls on the new page.
This was completely unexpected as it could result in the user
(inadvertently) changing the values of the already "accepted" controls
on the last page, so don't let this happen and always set the focus to
the new page explicitly, even if this hasn't been done by
ShowWithEffect() which doesn't do it at least under wxMSW.
Closes#23914.
NSBox used as a separator must have its type set to NSBoxSeparator.
This apparently didn't matter before in practice, but starting with
macOS 13, separators - i.e. narrow NSBoxes - without the type correctly
set are invisible.
Closes#23913.
There were two related problems: first, any attempts to set the
background colour for the cells without values were simply ignored
because we didn't call wxDataViewModel::GetAttr() at all from
PrepareForItem() in this case and, second, PrepareForItem() itself was
not called when repainting the control neither, resulting in the
existing attribute being reused for the items without values, meaning
that they used the last background colour that was set instead of at
least not using any background at all.
Fix both of the problems for the generic version. Unfortunately the GTK
one still doesn't allow setting the background for the empty cells, but
at least when not doing it the code now consistently leaves them without
any background.
The following code can be added to MyMusicTreeModel in the dataview
sample for testing this:
--------------------------------- >8 --------------------------------------
bool GetAttr( const wxDataViewItem& item, unsigned int col, wxDataViewItemAttr& attr) const override
{
if (col != 1)
return false;
if (IsContainer(item))
{
if (item != m_pop)
return false;
attr.SetBackgroundColour(*wxYELLOW);
}
else
{
attr.SetColour(*wxYELLOW);
attr.SetBackgroundColour(*wxLIGHT_GREY);
}
return true;
}
--------------------------------- >8 --------------------------------------
Closes#23708, #23902.
It's not clear whether it's worth explicitly checking for no-op seeks at
all, but unnecessarily calling GetLength() when doing it is certainly a
pessimization rather than optimization, so don't do it.
And don't bother checking for no-op seeks when seeking from end at all,
as it's not obviously faster than just performing the seek and the
existing code didn't work correctly anyhow, as it compared the current
position with "size-pos" instead of the correct "size+pos", so removing
it certainly shouldn't make things worse.
Closes#23895, #23897.
Change wxTreeCtrl default style under wxMSW to make it look more
up-to-date by default: use twisting buttons and full-row highlight and
don't display connector lines.
Using wxTR_LINES_AT_ROOT together with wxTR_NO_LINES may look odd but it
is needed because without wxTR_LINES_AT_ROOT, the buttons would not be
displayed.
Also update wxTreeCtrl screenshot in the docs.
Closes#23844.
Since we are not using any Qt geometry management (QLayout) inside wxWidgets
that guarantees proper resizeing of Qt window when its client widget is resized,
we have to do manual resizing to ensure that.
Postpone calling this function until we get the (first) frame callback
as by this time the EGL context is fully valid and can be used inside it
and it doesn't fail any longer.
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.
Closes#23899.
It seems that the check for m_surface added in 952de605f6 (Handle
map/unmap events on Wayland's wxGLCanvasEGL, 2023-08-25) was a
copy-paste error and we actually need to check m_wlSubsurface here.
Since a261c80 (Avoid Gdk-CRITICAL warnings when using PopupMenu() with
Wayland, 2022-04-22) popup menus shown when there is no related current
event did not work when using default positioning. Fix this by always
providing a GdkWindow and a GdkEvent, and using a suitable substitute
when a real event is not available.
See #23892
Unfortunately we can't let EGL under XWayland block neither, even if we
can't update the window efficiently in this case, as we could do when
using real Wayland in 194a7be33f (Improve wxGLCanvasEGL refresh logic
under Wayland, 2023-05-17), because otherwise occluding any window with
a wxGLCanvasEGL inside it slows down the entire program to a crawl as
all events are generated at a rate of 1 per second only.
Choose the lesser of two evils and update even completely hidden
windows, which is inefficient, but at least allows to also update the
other ones, unlike before.
Also note that we must call eglSwapInterval() in SwapBuffers() and that
calling it in CreateSurface() somehow has no effect when using Sway WM,
even though it would also solve the problem under GNOME/mutter.
Closes#23512.
Co-authored-by: Tristan Daniel <tdaniel22@users.noreply.github.com>
No real changes, just extract the common code between SaveFile() and LoadFile()
that converts wxBitmapType to Qt type and reuse it to eliminate code duplication.
Blend mask with alpha channel and remove the mask.
We need this function for performance reasons. e.g. the wxImageList (used by
wxTreeCtrl and wxListCtrl) calls this function to convert the mask (if any)
to alpha. Because the controls (under wxQt) using the image list ignore the
mask on the bitmaps and expect alpha instead.
This is similar to MSWBlendMaskWithAlpha() found in wxMSW port.