[Git][wxwidgets/wxwidgets][master] 25 commits: Fix wxMSW build errors when wxUSE_REGKEY=0

2 views
Skip to first unread message

Vadim Zeitlin (@_VZ_)

unread,
Apr 5, 2026, 1:09:30 PM (6 days ago) Apr 5
to wx-commi...@googlegroups.com

Vadim Zeitlin pushed to branch master at wxWidgets / wxWidgets

Commits:

  • 69b8d2d5
    by Tim Stahlhut at 2026-04-02T19:07:42-04:00
    Fix wxMSW build errors when wxUSE_REGKEY=0
    
  • 9377ec79
    by Tim Stahlhut at 2026-04-02T19:07:42-04:00
    change wxUSE_CONFIG_NATIVE setting logic in
    
    cmake and configure
    
  • e16c6ce5
    by Tim Stahlhut at 2026-04-02T19:07:42-04:00
    Add aborts when wxUSE_REGKEY=0
    
  • aabed97b
    by Tim Stahlhut at 2026-04-02T19:07:43-04:00
    Fix build of sample when wxUSE_REGKEY=0
    
  • b40c1100
    by Tim Stahlhut at 2026-04-02T19:07:43-04:00
    Add wxUSE_MIMETYPE guard to samples
    
  • 3bd3baae
    by Tim Stahlhut at 2026-04-02T19:07:43-04:00
    Build fixes when wxUSE_INTL=0
    
  • f3af0385
    by Tim Stahlhut at 2026-04-02T19:07:43-04:00
    Fix sample builds for wxUSE_INTL=0
    
  • f2ac6de0
    by Vadim Zeitlin at 2026-04-04T19:07:25+02:00
    Remove unused code for wxCAIRO_SCALE==0 in wxGTK
    
    The code for wxCAIRO_SCALE==1 was used since eaeb99858d (Use
    cairo_scale() for scaling to full printing resolution[...], 2008-04-30)
    and it doesn't seem useful to keep the fallback/original version any
    longer.
    
    This simplifies the code, allows to get rid of m_PS2DEV and m_DEV2PS
    members of wxGtkPrinterDCImpl (as they are always 1 now) and will
    facilitate the upcoming changes.
    
  • 05248eb3
    by Vadim Zeitlin at 2026-04-04T19:11:58+02:00
    Remove unnecessary [XY]LOG2DEV and DEV2LOG definitions
    
    Don't confuse things even more by defining macros or functions that do
    exactly the same thing as LogicalToDevice[XY] and DeviceToLogical[XY]
    member functions of wxDCImpl.
    
    This is just completely unnecessary, simply use the functions themselves
    directly instead.
    
    Note that there are still definitions of such macros in wxMSWDCImpl and
    wxPostScriptDCImpl code, but they actually do something different and so
    can't be just replaced with the function calls.
    
    No real changes.
    
  • 5d28a30c
    by Vadim Zeitlin at 2026-04-04T20:58:14+02:00
    Reimplement wxDC X/Y transformations in terms of wxPoint/wxSize
    
    Both DeviceToLogical{X,Y}() and DeviceToLogical() taking wxPoint were
    virtual, with the latter implemented in terms of the former by default,
    which meant that overriding only that function, but not the ones taking
    X/Y coordinates individually, could result in inconsistent behaviour,
    which is exactly what happened in wxMSW.
    
    Make it impossible for this to happen by only allowing to override the
    functions taking wxPoint (or wxSize for "relative" variant) and
    reimplementing the functions working with individual components in terms
    of the virtual functions.
    
    The same goes for LogicalToDevice() and "Rel" variants.
    
    As an important side effect, this fixes a bug in wxDC::StretchBlit() in
    wxMSW when using RTL layout as the code there used LogicalToDevice{X,Y}
    functions that didn't return the correct values before this commit.
    
    Update the tests to not test for the wrong behaviour of per-coordinate
    translation functions now that they behave correctly. Also remove the
    tests checking that per-coordinate translation doesn't work when the
    transformation matrix includes a rotational component.
    
    Update the documentation to emphasize that converting both coordinates
    at once is preferred.
    
    See #19344, #26266.
    
  • f736265b
    by Vadim Zeitlin at 2026-04-04T23:35:31+02:00
    Generalize Wine workaround to TransformedWithMatrixAndStd() too
    
    Previously this was only needed in TransformedWithMatrixAndStdEx() which
    verified that conversion actually worked, but not in the non-Ex version
    using individual coordinates as it only verified that the conversions
    failed, which they also did under Wine.
    
    But now that they should work (and do, under native Windows), we need
    the same workaround there as well.
    
    Also make sure that we output the warning message about the workaround
    not being needed any longer only once and only if it's really not needed
    (if it's used for some values, we still have to keep it, even if it's
    not used for the other ones).
    
  • ce69bc9b
    by Florian Larysch at 2026-04-05T16:54:14+02:00
    Fix crash with wxGLCanvas using EGL inside wxNotebook
    
    EGL implementation of wxGLCanvas requires its GTKHandleRealized() to be
    called in order to call wxGLCanvasEGL::OnRealized(), but this didn't
    happen when wxGLCanvas was used as a wxNotebook page because such pages
    are already realized by the time wxWindow::PostCreation() is called due
    to the wxNotebook-specific hack in its AddChildGTK() and PostCreation()
    skipped connecting to "realize" signal in this case.
    
    Fix this by always connecting to this signal, as the page can, and will,
    be unrealized and then re-realized later and the window must be notified
    when this happens.
    
    This commit is best viewed ignoring whitespace-only changes.
    
    Closes #26340.
    
    Co-authored-by: Vadim Zeitlin <va...@wxwidgets.org>
    
  • 14ca3839
    by Vadim Zeitlin at 2026-04-05T16:59:18+02:00
    Rename "unrealize" to "gtk_window_unrealized_callback"
    
    No real changes, just use the name consistent with that of "realize"
    callback.
    
  • 7bb87de2
    by Vadim Zeitlin at 2026-04-05T17:00:30+02:00
    Make GTKHandleUnrealize() virtual too
    
    No real changes yet, but this member function should also be virtual if
    only for consistency with GTKHandleRealized(): if the latter can be
    overridden, it should be also to override the former.
    
  • 322ba2b5
    by Vadim Zeitlin at 2026-04-05T17:03:06+02:00
    Rename GTKHandleUnrealize() to GTKHandleUnrealized()
    
    Make the name consistent with GTKHandleRealized().
    
    This is a private function which should never be called from outside the
    library, so it shouldn't be a problem to rename it.
    
  • 8ab925fa
    by Vadim Zeitlin at 2026-04-05T17:12:33+02:00
    Destroy EGL surface immediately when X11 window is unrealized
    
    This doesn't change much in the typical case when the window is either
    realized again immediately afterwards (as it happens with wxNotebook
    pages) or destroyed, but it seems tidier to do it just in case it
    remains in the unrealized state but still alive for some time.
    
    See #26340.
    
  • b9c3bdd1
    by Vadim Zeitlin at 2026-04-05T18:20:38+02:00
    Initialize member variables in declarations in typetest sample
    
    No real changes, just reduce the number of "#if" checks and make the
    code a bit more readable.
    
  • 4dd056e5
    by Vadim Zeitlin at 2026-04-05T18:22:00+02:00
    Prefer to call wxGetTranslation() on wxString
    
    This is a minor change, but it allows the code to still compile when
    wxUSE_INTL=0 without adding an extra unnecessary copy when it is 1.
    
    No real changes.
    
  • 85eeee17
    by Vadim Zeitlin at 2026-04-05T18:22:55+02:00
    Merge branch 'use-0-build-fixes'
    
    Fix build errors when wxUSE_REGKEY, wxUSE_INTL and/or wxUSE_MIMETYPE are
    set to 0.
    
    See #26332.
    
  • 3d40c2a0
    by AliKet at 2026-04-05T18:26:04+02:00
    Fix wxDC::StretchBlit() for non-0 xsrc in RTL layout
    
    This fixes problems when using this function to paint a scrolled window.
    
    See #26266.
    
  • 3740ec2e
    by Vadim Zeitlin at 2026-04-05T18:28:43+02:00
    Merge branch 'dc-log-dev'
    
    Ensure that wxDC::DeviceToLogical{X,Y}() and DeviceToLogical() etc are
    always consistent.
    
    See #26346.
    
  • 83d3774a
    by Blake-Madden at 2026-04-05T18:30:54+02:00
    Add wxSVGFileDC::Save()
    
    This function allows to check if the SVG file was written successfully.
    
    Closes #26347.
    
  • 7b175b92
    by Blake-Madden at 2026-04-05T18:33:19+02:00
    Update very outdated SVG support description in the documentation
    
    Say "most web browsers" instead of Netscape and don't mention Adobe any
    more.
    
    Also use HTTPS in the links.
    
    See #26347.
    
  • 932004d7
    by Vadim Zeitlin at 2026-04-05T18:33:47+02:00
    Don't impose arbitrary maximum length on picker controls text
    
    This code was there ever since ec376c8fd9 (added
    wx{Colour|File|Dir|Font}PickerCtrl (patch 1472329 by Francesco),
    2006-05-31), but didn't make any sense because it should be possible to
    enter arbitrarily long strings in these controls.
    
    Additionally, the maximum length was increased for wxFilePickerCtrl
    after creation which meant that that its initial contents was not shown
    in it, but the same string could be shown later, which was even more
    confusing.
    
    Just stop imposing any length constraints.
    
    See #7863.
    
    Closes #26314.
    
  • fda62b4c
    by Vadim Zeitlin at 2026-04-05T18:35:51+02:00
    Merge branch 'gtk-egl-notebook'
    
    Fix crash when using EGL-based wxGLCanvas in a wxNotebook and some
    related cleanup.
    
    See #26352.
    

45 changed files:

The diff was not included because it is too large.
Reply all
Reply to author
Forward
0 new messages