Previously, the first monitor was created instead and while it was often
also the primary one, this wasn't always the case.
In particular, this makes wxGetDisplayPPI() always return something
reasonable instead of returning (0, 0) when the first monitor is not the
primary one, as expected by plenty of code, including our own printing
sample, which divides by the values returned from wxGetDisplayPPI()
without checking if they're zero.
This is not necessarily the case at least under MSW, so while it makes
sense to do this by default in wxDisplayImpl::IsPrimary()
implementation, MSW-specific version should override it instead of being
totally unused as it was until now.
wxMemoryDC and wxScreenDC dtors were freeing a context they didn't own, potentially
causing a crash. Fixed by having the base wxWindowDC dtor free the context.
See #18566
When wxGetTBItemRect() is called on a control tool, it can cause a
TB_GETITEMRECT error message. Swap the if statements around so
wxGetTBItemRect is only called when it is needed.
Closes https://github.com/wxWidgets/wxWidgets/pull/1639
on these systems scrollbars on comboboxes are not always shown, even if the system is configured to do so, in these cases show all possible to avoid the impression of a limited subset
see https://github.com/wxWidgets/wxWidgets/pull/1534/files
Make wxEVT_MENU_HIGHLIGHT generation when there is no highlighted item
consistent across all the major ports: use wxID_NONE instead of wxID_ANY
in wxGTK and send these events, which were previously not sent at all in
this case, in wxOSX.
See https://github.com/wxWidgets/wxWidgets/pull/1637
This avoids glib warnings
object class 'GtkTextTag' has no property named 'underline-rgba-set'
when calling g_object_get() with older GTK and just avoids doing useless
work.
The changes of 3241e7a850 resulted in
Layout() not called any longer from wxEVT_SIZE handler for windows that
didn't use neither sizers nor constraints themselves, but did call
SetAutoLayout(true).
Fix this regression by checking for GetAutoLayout() explicitly.
See #18472.
This function is not supposed to overwrite the given alignment values
unless the alignment is specifically set for the given cell, but it
always overwrote them when called on m_defaultCellAttr, i.e. the
attribute used by the cells that don't have any special attribute.
This meant that custom attributes had to be set (or, more efficiently, a
custom attribute provider returning non-null attributes for all cells
had to be used) previously just to make the right alignment used by
default by number or date renderers work.
Fix this by ignoring the values set in the default attribute in this
function.
Also add a unit test (which required adding a special helper class just
to allow testing wxGrid::GetCellAttr() used by the renderers) that used
to fail but passes now.
Ensure that all native controls get WM_NCCALCSIZE soon after creation,
so that we can tell Windows about the themed controls we draw ourselves
in WM_NCPAINT.
Otherwise we could end up without any visible borders at all and, worse,
with bad display artefacts after resizing the control.
Just call SetWindowPos(SWP_FRAMECHANGED) to ensure that WM_NCCALCSIZE is
generated, even if the control is not resized later, which happens for
controls with fixed initial size.
Closes#18549.
This is unexpected, so add the check for the modifiers, as is done in
generic wxDataViewCtrl, to only accept the "real" Enter here and not
Ctrl-M sending the same key code.
Closes#17458.
Add labels for the columns using date format and labels for the cells
using date renderer/editor explicitly to give a better idea about what's
going on here.
Also use the same rows numbers for date cells as for the column ones for
consistency.
No real changes.
See 659ab78c6d
DoClose() shouldn't do anything if CFSocket hadn't been created at all
(as will be the case for blocking sockets) instead of creating it only
to destroy it immediately afterwards.
Ensure that last wxDataViewCtrl columns is always expanded to fit the
control width and a unit test checking for the scenario in which this
wasn't the case before, but is now.
See https://github.com/wxWidgets/wxWidgets/pull/1313
This seems unnecessary as the default log handler already outputs a new
line at the end of the message anyhow and at least some messages (e.g.
debug ones in GdkPixbuf) also contain an extra new line in them, so
adding another one here resulted in having at least one and sometimes
two extra blank lines.
Don't output "*** GTK log message while running" messages for every
g_debug() call when we the debug messages themselves will not be
displayed because G_MESSAGES_DEBUG is not set or its value doesn't
include the domain used by the message.
This results in much more reasonable output from the test suite.
See #17400.
It doesn't seem worth having it when it's only used in a couple of
places in a single file, unlike GetHwnd() which is used in dozens of
places across entire wxMSW.
Select the value of the ranged number grid editor when starting to edit
it, as is done for plain text and other editors, because this makes it
more convenient to replace the old value with the new one.
Closes https://github.com/wxWidgets/wxWidgets/pull/1626
This function, using Carbon API, is not used any longer since the
changes of 5b6af7002c, so remove it and
also remove the file where it was defined as there is nothing remaining
there any longer.
See https://github.com/wxWidgets/wxWidgets/pull/1561
This variable is totally unrelated to wxExecute(), so move it to generic
"utils" file (which hadn't existed when this variable was added to
utilsexc_base.cpp back in 5815e95907.
No real changes.
Don't try running non-bundled applications in wxCocoaLaunch(): this
prevents the code handling IO redirection from being used.
Check that we have a bundle, just like wxMacaunch(), used until
5b6af7002c, used to do.
Closes#18552.
See https://github.com/wxWidgets/wxWidgets/pull/1561