[Git][wxwidgets/wxwidgets][master] 20 commits: Fix screen position of child windows in RTL layout

1 view
Skip to first unread message

Vadim Zeitlin (@_VZ_)

unread,
Apr 4, 2026, 1:03:56 PM (7 days ago) Apr 4
to wx-commi...@googlegroups.com

Vadim Zeitlin pushed to branch master at wxWidgets / wxWidgets

Commits:

  • 0a11eda2
    by AliKet at 2026-03-30T16:26:58+01:00
    Fix screen position of child windows in RTL layout
    
    GetScreenPosition() now always returns the upper-left corner position
    of child windows in RTL layout under all platforms.
    
  • dc2eb03c
    by AliKet at 2026-03-30T16:26:59+01:00
    Fix auto-scrolling windows in RTL layout
    
    Auto-scrolling stopped working after commit 678382f568 (2026-02-22,
    wxScrolled<>: fix testing mouse position in autoscroll zone) and was
    fixed by the parent commit. As a consequence, scrolling direction is
    inverted now in RTL layout, and this commit just fixes it.
    
  • 07cdc6b3
    by AliKet at 2026-03-30T16:27:00+01:00
    Fix drawing with GDI+ initialized with a HDC in RTL layout on wxMSW
    
    Although GDI+ doesn't honor the LAYOUT_RTL flag set on the associated HDC,
    drawing on such dc with GDI+ may have unexpected results when that dc is
    then fed to some GDI functions, like for example UpdateLayeredWindow():
    a double mirroring can happen, which can be seen when drawing the rubberband
    in the drawing sample.
    
  • a492cfef
    by AliKet at 2026-03-30T16:27:00+01:00
    Store/Restore the original layout of the HDC associated with the GDI+ context
    
    The layout settings on the HDC (such as LAYOUT_RTL or LAYOUT_BITMAPORIENTATIONPRESERVED)
    are saved and cleared from the HDC during construction and restored on destruction, ensuring
    operations done with the wxGCDC don't affect the layout state of the original wxDC.
    
  • 941ec0c8
    by Vadim Zeitlin at 2026-04-01T14:12:14+02:00
    Avoid harmless MSVC warning about converting pointer to bool
    
    Do it explicitly to silence it.
    
  • c00f22d8
    by Vadim Zeitlin at 2026-04-02T22:58:55+02:00
    Use wxGtkObject instead of manual g_object_unref()
    
    No real changes, just use the RAII helper instead of manual memory
    management added in c456ccb28f (Fix memory leak in
    wxDataViewChoiceRenderer on GTK, 2026-03-31).
    
  • 08038496
    by Blake-Madden at 2026-04-02T22:58:55+02:00
    Document subcontrol access within wxEditableListBox
    
    Closes #26326.
    
  • 2d6aaa14
    by Vadim Zeitlin at 2026-04-03T00:24:28+02:00
    Improve wxListCtrl::GetColumn() documentation
    
    Mention that the index parameter must be valid as it is may not be
    clear.
    
    See #26337.
    
  • a62b2913
    by Florian Larysch at 2026-04-03T23:52:22+02:00
    Fix eglDestroySurface() argument order when using EGL with X11
    
    eglDestroySurface takes the display first and the surface second rather
    than the other way around. Since both EGLDisplay and EGLSurface are just
    typedef'd to void* this doesn't raise a compiler warning. This currently
    doesn't crash at runtime because Mesa validates the display pointer
    against a list of known good values and fails gracefully, but it still
    causes a resource leak.
    
    The wrong call was present since the changes of 23ccdb2 (Improve and
    document wxGLCanvas::CreateSurface(), 2023-03-21), see #23366.
    
    Closes #26341.
    
  • ec1ac087
    by Vadim Zeitlin at 2026-04-03T23:54:26+02:00
    Compare EGL surface with EGL_NO_SURFACE for consistency
    
    No real changes because EGL_NO_SURFACE is just 0 anyhow, but write the
    check for the surface being valid in a way consistent with all the other
    ones in this file.
    
  • 657960fc
    by Robert Roebling at 2026-04-04T15:22:10+02:00
    Update wxNotebook after changing page in wxMSW dark mode
    
    We already did this when the page was changed by the user, but not when
    changing it programmatically and the previously selected tab continued
    to wrongly appear selected.
    
    Fix this by moving the call to Refresh() to UpdateSelection() itself,
    which is always called when the selection changes, instead of doing it
    only in MSWOnNotify().
    
    Closes #26281.
    
    Closes #26329.
    
    Co-authored-by: Vadim Zeitlin <va...@wxwidgets.org>
    
  • e0321c2d
    by Vadim Zeitlin at 2026-04-04T15:25:02+02:00
    Fix layout of new page in the notebook sample
    
    Use sizer to position the buttons on the new pages instead of hardcoding
    the buttons positions which, unsurprisingly, didn't work well and
    resulted in buttons overlapping each other in high DPI.
    
  • fba6003b
    by Vadim Zeitlin at 2026-04-04T15:26:34+02:00
    Take default style into account in wxMSW wxTextCtrl::SetValue()
    
    Previously this only worked for plain EDIT controls but not for the
    controls with wxTE_RICH[2] style because WM_SETTEXT ignores the current
    text style for the latter.
    
    Work around this by using EM_REPLACESEL for them instead.
    
    Closes #26320.
    
    Closes #26321.
    
  • e9ab0194
    by Filip Hejsek at 2026-04-04T15:37:58+02:00
    Fix wxStyledTextCtrl::Get/SetUseAntiAliasing()
    
    Get/SetUseAntiAliasing() was originally added as a wxWidgets-specific
    extension of Scintilla, using extraFontFlag to store the setting. When
    Scintilla upstream added its own implementation of the same feature in
    the form of the SCI_SETFONTQUALITY message, the same field was used, but
    with incompatible values. Combined with other changes that happend since
    then, the result is that now SetUseAntiAliasing(true) does the opposite
    of what it is supposed to do. See #26339 for a more detailed analysis of
    the history.
    
    Fix this by removing all remaining traces of the original implementation
    of SetUseAntiAliasing(), and instead translating SetUseAntiAliasing()
    calls into SetFontQuality().
    
    Closes #26339.
    
    Closes #26342.
    
  • 9442c840
    by Vadim Zeitlin at 2026-04-04T15:56:52+02:00
    Fix wxAuiNotebook selection after Unsplit()
    
    Both the selection and the actually shown page may change after
    unsplitting, but we didn't update the internal state correctly,
    resulting in visibly broken notebook.
    
    Do it now by forcing the selection to switch to the actually selected
    page.
    
    Closes #26343.
    
  • 4254defb
    by Tim Stahlhut at 2026-04-04T16:51:48+02:00
    Fix wxGTK/Windows build after wxMoveToTrash() addition
    
    The implementation using glib, added in 400780a33f (Add wxMoveToTrash
    function, 2026-02-28), should only be used under Unix as Windows
    provides its own implementation.
    
    See #26256.
    
    Closes #26336.
    
  • 2c7c88b3
    by Vadim Zeitlin at 2026-04-04T16:59:12+02:00
    Merge branch 'win-scrnpos-rtl' of github.com:AliKet/wxWidgets
    
    More RTL fixes: for getting the window position on the screen,
    auto-scrolling in wxScrolled and wxGraphicsContext in wxMSW.
    
    See #26284.
    
  • 880c280c
    by Blake-Madden at 2026-04-04T11:55:45-04:00
    Add way to get generated SVG content from wxSVGFileDC
    This can be retrieved even if the content wasn't written to a file (e.g., file name was empty in the CTORs).
    
  • 9a5b1b6d
    by Blake-Madden at 2026-04-04T11:57:27-04:00
    Fix IsOK() returning false when bitmap processing was actually successful
    
  • 719c678a
    by Vadim Zeitlin at 2026-04-04T18:52:02+02:00
    Merge branch 'SVGText' of github.com:Blake-Madden/wxWidgets
    
    Add way to get generated SVG content from wxSVGFileDC.
    
    See #26344.
    

24 changed files:

Changes:

  • include/wx/dcsvg.h
    ... ... @@ -35,8 +35,6 @@ enum wxSVGShapeRenderingMode
    35 35
         wxSVG_SHAPE_RENDERING_OPTIMISE_SPEED = wxSVG_SHAPE_RENDERING_OPTIMIZE_SPEED
    
    36 36
     };
    
    37 37
     
    
    38
    -class WXDLLIMPEXP_FWD_BASE wxFileOutputStream;
    
    39
    -
    
    40 38
     class WXDLLIMPEXP_FWD_CORE wxSVGFileDC;
    
    41 39
     
    
    42 40
     // Base class for bitmap handlers used by wxSVGFileDC, used by the standard
    
    ... ... @@ -146,6 +144,8 @@ public:
    146 144
     
    
    147 145
         void SetShapeRenderingMode(wxSVGShapeRenderingMode renderingMode);
    
    148 146
     
    
    147
    +    wxString GetSVGDocument() const;
    
    148
    +
    
    149 149
     private:
    
    150 150
         virtual bool DoGetPixel(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y),
    
    151 151
                                 wxColour* WXUNUSED(col)) const override
    
    ... ... @@ -276,7 +276,7 @@ private:
    276 276
         bool                m_graphics_changed;  // set by Set{Brush,Pen}()
    
    277 277
         int                 m_width, m_height;
    
    278 278
         double              m_dpi;
    
    279
    -    std::unique_ptr<wxFileOutputStream> m_outfile;
    
    279
    +    wxString            m_svgDocument;
    
    280 280
         std::unique_ptr<wxSVGBitmapHandler> m_bmp_handler; // class to handle bitmaps
    
    281 281
         wxSVGShapeRenderingMode m_renderingMode;
    
    282 282
     
    
    ... ... @@ -323,6 +323,9 @@ public:
    323 323
     
    
    324 324
         void SetShapeRenderingMode(wxSVGShapeRenderingMode renderingMode);
    
    325 325
     
    
    326
    +    // Return the SVG document as a string.
    
    327
    +    wxString GetSVGDocument() const;
    
    328
    +
    
    326 329
     private:
    
    327 330
         wxDECLARE_ABSTRACT_CLASS(wxSVGFileDC);
    
    328 331
     };
    

  • include/wx/gtk/private/object.h
    ... ... @@ -22,6 +22,7 @@ public:
    22 22
         explicit wxGtkObject(T *p) : m_ptr(p) { }
    
    23 23
         ~wxGtkObject() { if ( m_ptr ) g_object_unref(m_ptr); }
    
    24 24
     
    
    25
    +    T* get() const { return m_ptr; }
    
    25 26
         operator T *() const { return m_ptr; }
    
    26 27
     
    
    27 28
         T** Out()
    

  • include/wx/tipwin.h
    ... ... @@ -48,7 +48,7 @@ public:
    48 48
             Ref& operator=(std::nullptr_t);
    
    49 49
     
    
    50 50
             bool operator!=(std::nullptr_t) const { return m_ptr != nullptr; }
    
    51
    -        explicit operator bool() const { return m_ptr; }
    
    51
    +        explicit operator bool() const { return m_ptr != nullptr; }
    
    52 52
             wxTipWindow* operator->() const { return m_ptr; }
    
    53 53
     
    
    54 54
         private:
    

  • interface/wx/dcsvg.h
    ... ... @@ -68,7 +68,8 @@ public:
    68 68
             @a height at @a dpi resolution, and an optional @a title.
    
    69 69
     
    
    70 70
             The title provides a readable name for the SVG document.
    
    71
    -        The filename is allowed to be empty, in which case no SVG file will be written.
    
    71
    +        The filename is allowed to be empty, in which case no SVG file will be
    
    72
    +        written. Call GetSVGDocument() to retrieve the generated content.
    
    72 73
         */
    
    73 74
         wxSVGFileDC(const wxString& filename, int width = 320, int height = 240,
    
    74 75
                     double dpi = wxSVG_DEFAULT_DPI, const wxString& title = wxString());
    
    ... ... @@ -78,7 +79,8 @@ public:
    78 79
             an optional @a title, and an optional @a dpi resolution.
    
    79 80
     
    
    80 81
             The title provides a readable name for the SVG document.
    
    81
    -        The filename is allowed to be empty, in which case no SVG file will be written.
    
    82
    +        The filename is allowed to be empty, in which case no SVG file will be
    
    83
    +        written. Call GetSVGDocument() to retrieve the generated content.
    
    82 84
     
    
    83 85
             @since 3.3.2
    
    84 86
         */
    
    ... ... @@ -123,6 +125,17 @@ public:
    123 125
         */
    
    124 126
         void SetShapeRenderingMode(wxSVGShapeRenderingMode renderingMode);
    
    125 127
     
    
    128
    +    /**
    
    129
    +        Returns the SVG document as a string.
    
    130
    +
    
    131
    +        This can be used to retrieve the generated SVG content regardless of
    
    132
    +        whether it was also written to a file. This can be called after all
    
    133
    +        drawing commands to get the current SVG content.
    
    134
    +
    
    135
    +        @since 3.3.3
    
    136
    +    */
    
    137
    +    wxString GetSVGDocument() const;
    
    138
    +
    
    126 139
         /**
    
    127 140
             Destroys the current clipping region so that none of the DC is clipped.
    
    128 141
             Since intersections arising from sequential calls to SetClippingRegion are represented
    

  • interface/wx/editlbox.h
    ... ... @@ -30,7 +30,17 @@
    30 30
                Default style: wxEL_ALLOW_NEW|wxEL_ALLOW_EDIT|wxEL_ALLOW_DELETE.
    
    31 31
         @endStyleTable
    
    32 32
     
    
    33
    -    The control uses a wxListCtrl internally and emit its events.
    
    33
    +    The control uses a wxListCtrl internally and emits its events.
    
    34
    +
    
    35
    +    @remarks
    
    36
    +    This control provides access to its internal components (e.g., GetNewButton(),
    
    37
    +    GetListCtrl()) for advanced customization.
    
    38
    +
    
    39
    +    You may bind events directly to these internal buttons (e.g., @c wxEVT_BUTTON)
    
    40
    +    to intercept or augment default behavior. To add custom validation before
    
    41
    +    an action occurs, bind to the button and call `event.Skip()` only if
    
    42
    +    validation passes. To completely override the default behavior,
    
    43
    +    omit the call to `event.Skip()`.
    
    34 44
     
    
    35 45
         @library{wxcore}
    
    36 46
         @category{ctrl}
    
    ... ... @@ -100,5 +110,47 @@ public:
    100 110
             (the array will be erased before control's contents are appended).
    
    101 111
         */
    
    102 112
         void GetStrings(wxArrayString& strings) const;
    
    113
    +
    
    114
    +    /**
    
    115
    +        Returns the internal list control used by the editable list box.
    
    116
    +        While contents should ideally be managed via SetStrings(), this
    
    117
    +        allows for cosmetic customization of the list display.
    
    118
    +    */
    
    119
    +    wxListCtrl* GetListCtrl();
    
    120
    +
    
    121
    +    /**
    
    122
    +        Returns the button used to delete the selected item from the list.
    
    123
    +        Can be used for granular customization, such as changing the icon
    
    124
    +        via SetBitmapLabel().
    
    125
    +    */
    
    126
    +    wxBitmapButton* GetDelButton();
    
    127
    +
    
    128
    +    /**
    
    129
    +        Returns the button used to add a new item to the list.
    
    130
    +        Can be used for granular customization, such as changing the icon
    
    131
    +        via SetBitmapLabel().
    
    132
    +    */
    
    133
    +    wxBitmapButton* GetNewButton();
    
    134
    +
    
    135
    +    /**
    
    136
    +        Returns the button used to move the selected item up in the list.
    
    137
    +        Can be used for granular customization, such as changing the icon
    
    138
    +        via SetBitmapLabel().
    
    139
    +    */
    
    140
    +    wxBitmapButton* GetUpButton();
    
    141
    +
    
    142
    +    /**
    
    143
    +        Returns the button used to move the selected item down in the list.
    
    144
    +        Can be used for granular customization, such as changing the icon
    
    145
    +        via SetBitmapLabel().
    
    146
    +    */
    
    147
    +    wxBitmapButton* GetDownButton();
    
    148
    +
    
    149
    +    /**
    
    150
    +        Returns the button used to edit the label of the selected item.
    
    151
    +        Can be used for granular customization, such as changing the icon
    
    152
    +        via SetBitmapLabel().
    
    153
    +    */
    
    154
    +    wxBitmapButton* GetEditButton();
    
    103 155
     };
    
    104 156
     

  • interface/wx/listctrl.h
    ... ... @@ -572,12 +572,20 @@ public:
    572 572
     
    
    573 573
         /**
    
    574 574
             Gets information about this column.
    
    575
    +
    
    575 576
             See SetItem() for more information.
    
    576 577
     
    
    577 578
             @beginWxPerlOnly
    
    578 579
             In wxPerl this method takes only the @a col parameter and
    
    579 580
             returns a @c Wx::ListItem (or @c undef).
    
    580 581
             @endWxPerlOnly
    
    582
    +
    
    583
    +        @param col The column index. It must be valid, i.e. positive or 0 and
    
    584
    +            strictly less than GetColumnCount(). The function asserts if this
    
    585
    +            is not the case.
    
    586
    +        @param item Output parameter filled with the information about the
    
    587
    +            column on successful return.
    
    588
    +        @return Always @true if the column index is valid.
    
    581 589
         */
    
    582 590
         bool GetColumn(int col, wxListItem& item) const;
    
    583 591
     
    

  • interface/wx/stc/stc.h
    ... ... @@ -8026,15 +8026,22 @@ public:
    8026 8026
         bool DoDropText(long x, long y, const wxString& data);
    
    8027 8027
     
    
    8028 8028
         /**
    
    8029
    -       Specify whether anti-aliased fonts should be used.
    
    8029
    +       Specify whether anti-aliasing should be used when rendering text.
    
    8030 8030
     
    
    8031
    -      This will have no effect on some platforms, but on some (wxMac for
    
    8032
    -      example) can greatly improve performance.
    
    8031
    +       If @p useAA is true, sets @ref SetFontQuality() "font quality" to @c wxSTC_EFF_QUALITY_DEFAULT.
    
    8032
    +
    
    8033
    +       If @p useAA is false, sets @ref SetFontQuality() "font quality" to @c wxSTC_EFF_QUALITY_NON_ANTIALIASED.
    
    8034
    +
    
    8035
    +       Prefer using @ref SetFontQuality() directly in new code.
    
    8033 8036
         */
    
    8034 8037
         void SetUseAntiAliasing(bool useAA);
    
    8035 8038
     
    
    8036 8039
         /**
    
    8037
    -       Returns the current UseAntiAliasing setting.
    
    8040
    +       Returns whether anti-aliasing is enabled by @ref SetFontQuality() "font quality" setting.
    
    8041
    +
    
    8042
    +       This function returns true if GetFontQuality() is something other than @c wxSTC_EFF_QUALITY_NON_ANTIALIASED.
    
    8043
    +
    
    8044
    +       Prefer using @ref GetFontQuality() directly in new code.
    
    8038 8045
         */
    
    8039 8046
         bool GetUseAntiAliasing();
    
    8040 8047
     
    

  • interface/wx/window.h
    ... ... @@ -2006,6 +2006,9 @@ public:
    2006 2006
             @param y
    
    2007 2007
                 Receives the y position of the window on the screen if non-null.
    
    2008 2008
     
    
    2009
    +        @note Starting from wxWidgets 3.3.3, this function correctly returns the
    
    2010
    +              upper-left corner of the window in RTL layout for child windows too.
    
    2011
    +
    
    2009 2012
             @see GetPosition()
    
    2010 2013
         */
    
    2011 2014
         void GetScreenPosition(int* x, int* y) const;
    

  • samples/notebook/notebook.cpp
    ... ... @@ -635,8 +635,13 @@ wxPanel *MyFrame::CreateNewPage() const
    635 635
         panel->SetHelpText("Panel with \"First\" and \"Second\" buttons");
    
    636 636
     #endif
    
    637 637
     
    
    638
    -    (void) new wxButton(panel, wxID_ANY, "First button", wxPoint(10, 30));
    
    639
    -    (void) new wxButton(panel, wxID_ANY, "Second button", wxPoint(150, 30));
    
    638
    +    wxBoxSizer* const sizer = new wxBoxSizer(wxHORIZONTAL);
    
    639
    +    panel->SetSizer(sizer);
    
    640
    +
    
    641
    +    sizer->Add(new wxButton(panel, wxID_ANY, "First button"),
    
    642
    +               wxSizerFlags().Border());
    
    643
    +    sizer->Add(new wxButton(panel, wxID_ANY, "Second button"),
    
    644
    +               wxSizerFlags().Border());
    
    640 645
     
    
    641 646
         return panel;
    
    642 647
     }
    

  • src/aui/auibook.cpp
    ... ... @@ -3013,6 +3013,22 @@ void wxAuiNotebook::UnsplitAll()
    3013 3013
     
    
    3014 3014
         if ( changed )
    
    3015 3015
         {
    
    3016
    +        // We need to update the selection if the current page was in another
    
    3017
    +        // tab control before, so force a selection change to ensure that the
    
    3018
    +        // right page is shown.
    
    3019
    +        m_curPage = wxNOT_FOUND;
    
    3020
    +        int sel = tabMain->GetActivePage();
    
    3021
    +        if ( sel == wxNOT_FOUND )
    
    3022
    +        {
    
    3023
    +            // Not sure if this can actually happen, but fall back to the first
    
    3024
    +            // page if it does (note that we know that the main tab control is
    
    3025
    +            // not empty as we must have added a page to it above for "changed"
    
    3026
    +            // to be true).
    
    3027
    +            sel = 0;
    
    3028
    +        }
    
    3029
    +
    
    3030
    +        ChangeSelection(sel);
    
    3031
    +
    
    3016 3032
             RemoveEmptyTabFrames();
    
    3017 3033
     
    
    3018 3034
             DoSizing();
    

  • src/common/dcsvg.cpp
    ... ... @@ -20,9 +20,10 @@
    20 20
     
    
    21 21
     #include "wx/base64.h"
    
    22 22
     #include "wx/dcsvg.h"
    
    23
    -#include "wx/wfstream.h"
    
    23
    +#include "wx/file.h"
    
    24 24
     #include "wx/filename.h"
    
    25 25
     #include "wx/mstream.h"
    
    26
    +#include "wx/sstream.h"
    
    26 27
     #include "wx/scopedarray.h"
    
    27 28
     #include "wx/private/rescale.h"
    
    28 29
     
    
    ... ... @@ -501,6 +502,11 @@ void wxSVGFileDC::SetShapeRenderingMode(wxSVGShapeRenderingMode renderingMode)
    501 502
         ((wxSVGFileDCImpl*)GetImpl())->SetShapeRenderingMode(renderingMode);
    
    502 503
     }
    
    503 504
     
    
    505
    +wxString wxSVGFileDC::GetSVGDocument() const
    
    506
    +{
    
    507
    +    return ((wxSVGFileDCImpl*)GetImpl())->GetSVGDocument();
    
    508
    +}
    
    509
    +
    
    504 510
     // ----------------------------------------------------------
    
    505 511
     // wxSVGFileDCImpl
    
    506 512
     // ----------------------------------------------------------
    
    ... ... @@ -549,11 +555,6 @@ void wxSVGFileDCImpl::Init(const wxString& filename, int width, int height,
    549 555
     
    
    550 556
         m_bmp_handler.reset();
    
    551 557
     
    
    552
    -    if ( m_filename.empty() )
    
    553
    -        m_outfile.reset();
    
    554
    -    else
    
    555
    -        m_outfile.reset(new wxFileOutputStream(m_filename));
    
    556
    -
    
    557 558
         wxString s;
    
    558 559
         s += wxS("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n");
    
    559 560
         s += wxS("<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n\n");
    
    ... ... @@ -566,16 +567,27 @@ void wxSVGFileDCImpl::Init(const wxString& filename, int width, int height,
    566 567
         write(s);
    
    567 568
     }
    
    568 569
     
    
    569
    -wxSVGFileDCImpl::~wxSVGFileDCImpl()
    
    570
    +wxString wxSVGFileDCImpl::GetSVGDocument() const
    
    570 571
     {
    
    571
    -    wxString s;
    
    572
    +    wxString doc(m_svgDocument);
    
    572 573
     
    
    573 574
         // Close remaining clipping group elements
    
    574 575
         for (size_t i = 0; i < m_clipUniqueId; i++)
    
    575
    -        s += wxS("</g>\n");
    
    576
    +        doc += wxS("</g>\n");
    
    576 577
     
    
    577
    -    s += wxS("</g>\n</svg>\n");
    
    578
    -    write(s);
    
    578
    +    doc += wxS("</g>\n</svg>\n");
    
    579
    +
    
    580
    +    return doc;
    
    581
    +}
    
    582
    +
    
    583
    +wxSVGFileDCImpl::~wxSVGFileDCImpl()
    
    584
    +{
    
    585
    +    if ( !m_filename.empty() )
    
    586
    +    {
    
    587
    +        wxFile file(m_filename, wxFile::write);
    
    588
    +        if ( file.IsOpened() )
    
    589
    +            file.Write(GetSVGDocument(), wxConvUTF8);
    
    590
    +    }
    
    579 591
     }
    
    580 592
     
    
    581 593
     void wxSVGFileDCImpl::DoGetSizeMM(int* width, int* height) const
    
    ... ... @@ -1435,28 +1447,17 @@ void wxSVGFileDCImpl::DoDrawBitmap(const wxBitmap& bmp, wxCoord x, wxCoord y,
    1435 1447
         if ( AreAutomaticBoundingBoxUpdatesEnabled() )
    
    1436 1448
             CalcBoundingBox(x, y, x + bmp.GetWidth(), y + bmp.GetHeight());
    
    1437 1449
     
    
    1438
    -    if ( !m_outfile )
    
    1439
    -        return;
    
    1440
    -
    
    1441 1450
         // If we don't have any bitmap handler yet, use the default one.
    
    1442 1451
         if ( !m_bmp_handler )
    
    1443 1452
             m_bmp_handler.reset(new wxSVGBitmapFileHandler(m_filename));
    
    1444 1453
     
    
    1445
    -    m_writeError = m_bmp_handler->ProcessBitmap(bmp, x, y, *m_outfile);
    
    1454
    +    wxStringOutputStream stream(&m_svgDocument);
    
    1455
    +    m_writeError = !m_bmp_handler->ProcessBitmap(bmp, x, y, stream);
    
    1446 1456
     }
    
    1447 1457
     
    
    1448 1458
     void wxSVGFileDCImpl::write(const wxString& s)
    
    1449 1459
     {
    
    1450
    -    if ( !m_outfile )
    
    1451
    -        return;
    
    1452
    -
    
    1453
    -    if ( m_outfile->IsOk() )
    
    1454
    -    {
    
    1455
    -        const wxCharBuffer buf = s.utf8_str();
    
    1456
    -        m_outfile->Write(buf, strlen((const char*)buf));
    
    1457
    -    }
    
    1458
    -
    
    1459
    -    m_writeError = !m_outfile->IsOk();
    
    1460
    +    m_svgDocument += s;
    
    1460 1461
     }
    
    1461 1462
     
    
    1462 1463
     #endif // wxUSE_SVG

  • src/common/wincmn.cpp
    ... ... @@ -1082,6 +1082,17 @@ void wxWindowBase::DoGetScreenPosition(int *x, int *y) const
    1082 1082
             *y = 0;
    
    1083 1083
     
    
    1084 1084
         ClientToScreen(x, y);
    
    1085
    +
    
    1086
    +    if ( x && GetLayoutDirection() == wxLayout_RightToLeft )
    
    1087
    +    {
    
    1088
    +        // In RTL layout, ClientToScreen(0, 0) correctly returns the upper-right corner
    
    1089
    +        // of the window (for non TLWs). But the window position relative to the desktop
    
    1090
    +        // surface should be expressed by its upper-left corner because position (0, 0)
    
    1091
    +        // of the desktop surface is always at the upper-left even in RTL.
    
    1092
    +        int width;
    
    1093
    +        DoGetSize(&width, nullptr);
    
    1094
    +        *x -= width;
    
    1095
    +    }
    
    1085 1096
     }
    
    1086 1097
     
    
    1087 1098
     void wxWindowBase::SendSizeEvent(int flags)
    

  • src/generic/scrlwing.cpp
    ... ... @@ -753,13 +753,15 @@ wxScrollHelperBase::AutoscrollTest(wxPoint clientPt,
    753 753
         // can window can be scrolled in this direction?
    
    754 754
         if ( m_win->HasScrollbar(wxHORIZONTAL) )
    
    755 755
         {
    
    756
    +        const bool isRTL = m_win->GetLayoutDirection() == wxLayout_RightToLeft;
    
    757
    +
    
    756 758
             if ( screenPt.x < inner.GetLeft() )
    
    757 759
             {
    
    758
    -            evtHorzScroll = wxEVT_SCROLLWIN_LINEUP;
    
    760
    +            evtHorzScroll = isRTL ? wxEVT_SCROLLWIN_LINEDOWN : wxEVT_SCROLLWIN_LINEUP;
    
    759 761
             }
    
    760 762
             else if (screenPt.x >= inner.GetRight() )
    
    761 763
             {
    
    762
    -            evtHorzScroll = wxEVT_SCROLLWIN_LINEDOWN;
    
    764
    +            evtHorzScroll = isRTL ? wxEVT_SCROLLWIN_LINEUP : wxEVT_SCROLLWIN_LINEDOWN;
    
    763 765
             }
    
    764 766
         }
    
    765 767
     
    

  • src/gtk/dataview.cpp
    ... ... @@ -37,6 +37,7 @@
    37 37
     #include "wx/gtk/private/gtk3-compat.h"
    
    38 38
     #include "wx/gtk/private/image.h"
    
    39 39
     #include "wx/gtk/private/list.h"
    
    40
    +#include "wx/gtk/private/object.h"
    
    40 41
     #include "wx/gtk/private/treeview.h"
    
    41 42
     #include "wx/gtk/private/value.h"
    
    42 43
     
    
    ... ... @@ -2997,7 +2998,7 @@ wxDataViewChoiceRenderer::wxDataViewChoiceRenderer( const wxArrayString &choices
    2997 2998
         , m_choices(choices)
    
    2998 2999
     {
    
    2999 3000
         m_renderer = (GtkCellRenderer*) gtk_cell_renderer_combo_new();
    
    3000
    -    GtkListStore *store = gtk_list_store_new( 1, G_TYPE_STRING );
    
    3001
    +    wxGtkObject<GtkListStore> store{gtk_list_store_new( 1, G_TYPE_STRING )};
    
    3001 3002
         for (size_t n = 0; n < m_choices.GetCount(); n++)
    
    3002 3003
         {
    
    3003 3004
             gtk_list_store_insert_with_values(
    
    ... ... @@ -3006,11 +3007,10 @@ wxDataViewChoiceRenderer::wxDataViewChoiceRenderer( const wxArrayString &choices
    3006 3007
         }
    
    3007 3008
     
    
    3008 3009
         g_object_set (m_renderer,
    
    3009
    -            "model", store,
    
    3010
    +            "model", store.get(),
    
    3010 3011
                 "text-column", 0,
    
    3011 3012
                 "has-entry", FALSE,
    
    3012 3013
                 nullptr);
    
    3013
    -    g_object_unref(store);
    
    3014 3014
     
    
    3015 3015
         bool editable = (mode & wxDATAVIEW_CELL_EDITABLE) != 0;
    
    3016 3016
         g_object_set (m_renderer, "editable", editable, nullptr);
    

  • src/gtk/utilsgtk.cpp
    ... ... @@ -338,8 +338,6 @@ bool wxGUIAppTraits::ShowAssertDialog(const wxString& msg)
    338 338
         return wxAppTraitsBase::ShowAssertDialog(msg);
    
    339 339
     }
    
    340 340
     
    
    341
    -#endif // __UNIX__
    
    342
    -
    
    343 341
     bool wxMoveToTrash(const wxString& path)
    
    344 342
     {
    
    345 343
         wxGtkError err;
    
    ... ... @@ -354,3 +352,5 @@ bool wxMoveToTrash(const wxString& path)
    354 352
     
    
    355 353
         return ok;
    
    356 354
     }
    
    355
    +
    
    356
    +#endif // __UNIX__

  • src/msw/graphics.cpp
    ... ... @@ -92,7 +92,7 @@ StringFormat* gs_drawTextStringFormat = nullptr;
    92 92
     // Get the string format used for the text drawing and measuring functions:
    
    93 93
     // notice that it must be the same one for all of them, otherwise the drawn
    
    94 94
     // text might be of different size than what measuring it returned.
    
    95
    -inline StringFormat* GetDrawTextStringFormat(wxLayoutDirection dir = wxLayout_Default)
    
    95
    +inline StringFormat* GetDrawTextStringFormat(DWORD layoutDir = 0)
    
    96 96
     {
    
    97 97
         if ( !gs_drawTextStringFormat )
    
    98 98
         {
    
    ... ... @@ -103,7 +103,7 @@ inline StringFormat* GetDrawTextStringFormat(wxLayoutDirection dir = wxLayout_De
    103 103
             auto flags = gs_drawTextStringFormat->GetFormatFlags()
    
    104 104
                        | StringFormatFlagsMeasureTrailingSpaces;
    
    105 105
     
    
    106
    -        if ( dir == wxLayout_RightToLeft )
    
    106
    +        if ( (layoutDir & LAYOUT_RTL) != 0 )
    
    107 107
                 flags |= StringFormatFlagsDirectionRightToLeft;
    
    108 108
     
    
    109 109
             gs_drawTextStringFormat->SetFormatFlags(flags);
    
    ... ... @@ -483,7 +483,7 @@ public:
    483 483
     
    
    484 484
         Graphics* GetGraphics() const { return m_context; }
    
    485 485
     
    
    486
    -    bool IsRTL() const { return m_layoutDir == wxLayout_RightToLeft; }
    
    486
    +    bool IsRTL() const { return (m_layoutDir & LAYOUT_RTL) != 0; }
    
    487 487
     
    
    488 488
         virtual WXHDC GetNativeHDC() override;
    
    489 489
         virtual void ReleaseNativeHDC(WXHDC hdc) override;
    
    ... ... @@ -505,7 +505,7 @@ private:
    505 505
         GraphicsState m_state2;
    
    506 506
         Matrix* m_internalTransform;
    
    507 507
         Matrix* m_internalTransformInv;
    
    508
    -    wxLayoutDirection m_layoutDir = wxLayout_Default;
    
    508
    +    DWORD m_layoutDir = 0;
    
    509 509
     
    
    510 510
         wxDECLARE_NO_COPY_CLASS(wxGDIPlusContext);
    
    511 511
     };
    
    ... ... @@ -1903,16 +1903,39 @@ public :
    1903 1903
     
    
    1904 1904
     wxGDIPlusContext::wxGDIPlusContext( wxGraphicsRenderer* renderer, HDC hdc, wxDouble width, wxDouble height   )
    
    1905 1905
         : wxGraphicsContext(renderer)
    
    1906
    -    , m_layoutDir((::GetLayout(hdc) & LAYOUT_RTL) ? wxLayout_RightToLeft : wxLayout_LeftToRight)
    
    1906
    +    , m_layoutDir(::GetLayout(hdc))
    
    1907 1907
     {
    
    1908
    +    if ( IsRTL() )
    
    1909
    +    {
    
    1910
    +        // Mixing GDI+ with pure GDI calls on the same drawing may have
    
    1911
    +        // unexpected results in RTL layout. i.e.: The final drawing may
    
    1912
    +        // not be correctly mirrored on the destination DC. So we always
    
    1913
    +        // perform drawing operations on an LTR HDC and a transformation
    
    1914
    +        // matrix will be applied to this context to achieve the necessary
    
    1915
    +        // mirroring effects.
    
    1916
    +        ::SetLayout(hdc, 0);
    
    1917
    +    }
    
    1918
    +
    
    1908 1919
         Init(new Graphics(hdc), width, height);
    
    1909 1920
     }
    
    1910 1921
     
    
    1911 1922
     wxGDIPlusContext::wxGDIPlusContext( wxGraphicsRenderer* renderer, const wxDC& dc )
    
    1912 1923
         : wxGraphicsContext(renderer, dc.GetWindow())
    
    1913
    -    , m_layoutDir(dc.GetLayoutDirection())
    
    1924
    +    , m_layoutDir(::GetLayout((HDC)dc.GetHandle()))
    
    1914 1925
     {
    
    1915 1926
         HDC hdc = (HDC) dc.GetHDC();
    
    1927
    +
    
    1928
    +    if ( IsRTL() )
    
    1929
    +    {
    
    1930
    +        // Mixing GDI+ with pure GDI calls on the same drawing may have
    
    1931
    +        // unexpected results in RTL layout. i.e.: The final drawing may
    
    1932
    +        // not be correctly mirrored on the destination DC. So we always
    
    1933
    +        // perform drawing operations on an LTR HDC and a transformation
    
    1934
    +        // matrix will be applied to this context to achieve the necessary
    
    1935
    +        // mirroring effects.
    
    1936
    +        ::SetLayout(hdc, 0);
    
    1937
    +    }
    
    1938
    +
    
    1916 1939
         wxSize sz = dc.GetSize();
    
    1917 1940
     
    
    1918 1941
         // We don't set HDC origin at MSW level in wxDC because this limits it to
    
    ... ... @@ -1937,9 +1960,12 @@ wxGDIPlusContext::wxGDIPlusContext( wxGraphicsRenderer* renderer,
    1937 1960
                                         HWND hwnd,
    
    1938 1961
                                         wxWindow* window )
    
    1939 1962
         : wxGraphicsContext(renderer, window)
    
    1940
    -    , m_layoutDir((::GetWindowLong(hwnd, GWL_EXSTYLE) & WS_EX_LAYOUTRTL) ? wxLayout_RightToLeft
    
    1941
    -                                                                         : wxLayout_LeftToRight)
    
    1942 1963
     {
    
    1964
    +    if ( (::GetWindowLong(hwnd, GWL_EXSTYLE) & WS_EX_LAYOUTRTL) != 0 )
    
    1965
    +    {
    
    1966
    +        m_layoutDir = LAYOUT_RTL;
    
    1967
    +    }
    
    1968
    +
    
    1943 1969
         RECT rect = wxGetWindowRect(hwnd);
    
    1944 1970
         Init(new Graphics(hwnd), rect.right - rect.left, rect.bottom - rect.top);
    
    1945 1971
         m_enableOffset = true;
    
    ... ... @@ -1968,7 +1994,7 @@ void wxGDIPlusContext::Init(Graphics* graphics, int width, int height, const Mat
    1968 1994
         m_height = height;
    
    1969 1995
         m_internalTransform = new Matrix();
    
    1970 1996
     
    
    1971
    -    if ( m_layoutDir == wxLayout_RightToLeft )
    
    1997
    +    if ( IsRTL() )
    
    1972 1998
         {
    
    1973 1999
             m_context->ScaleTransform(-1, 1);
    
    1974 2000
             m_context->TranslateTransform(-width, 0);
    
    ... ... @@ -1995,6 +2021,13 @@ void wxGDIPlusContext::Init(Graphics* graphics, int width, int height, const Mat
    1995 2021
     
    
    1996 2022
     wxGDIPlusContext::~wxGDIPlusContext()
    
    1997 2023
     {
    
    2024
    +    if ( IsRTL() )
    
    2025
    +    {
    
    2026
    +        WXHDC hdc = GetNativeHDC();
    
    2027
    +        ::SetLayout((HDC)hdc, m_layoutDir);
    
    2028
    +        ReleaseNativeHDC(hdc);
    
    2029
    +    }
    
    2030
    +
    
    1998 2031
         delete m_internalTransform;
    
    1999 2032
         delete m_internalTransformInv;
    
    2000 2033
         if ( m_context )
    

  • src/msw/notebook.cpp
    ... ... @@ -388,6 +388,11 @@ void wxNotebook::UpdateSelection(int selNew)
    388 388
         }
    
    389 389
     
    
    390 390
         m_selection = selNew;
    
    391
    +
    
    392
    +  // We need to update the tabs after the selection change when drawing
    
    393
    +  // them ourselves, otherwise the previously selected tab is not redrawn.
    
    394
    +  if ( wxMSWDarkMode::IsActive() )
    
    395
    +      Refresh();
    
    391 396
     }
    
    392 397
     
    
    393 398
     int wxNotebook::ChangeSelection(size_t nPage)
    
    ... ... @@ -1935,15 +1940,8 @@ bool wxNotebook::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM* result)
    1935 1940
       // Change the selection before generating the event as its handler should
    
    1936 1941
       // already see the new page selected.
    
    1937 1942
       if ( hdr->code == TCN_SELCHANGE )
    
    1938
    -  {
    
    1939 1943
           UpdateSelection(event.GetSelection());
    
    1940 1944
     
    
    1941
    -      // We need to update the tabs after the selection change when drawing
    
    1942
    -      // them ourselves, otherwise the previously selected tab is not redrawn.
    
    1943
    -      if ( wxMSWDarkMode::IsActive() )
    
    1944
    -          Refresh();
    
    1945
    -  }
    
    1946
    -
    
    1947 1945
       bool processed = HandleWindowEvent(event);
    
    1948 1946
       *result = !event.IsAllowed();
    
    1949 1947
       return processed;
    

  • src/msw/textctrl.cpp
    ... ... @@ -1301,7 +1301,24 @@ void wxTextCtrl::DoWriteText(const wxString& value, int flags)
    1301 1301
             if ( !m_defaultStyle.IsDefault() )
    
    1302 1302
             {
    
    1303 1303
                 long start, end;
    
    1304
    -            GetSelection(&start, &end);
    
    1304
    +
    
    1305
    +            // For the selection style to be taken into account, we must use
    
    1306
    +            // EM_REPLACESEL below, WM_SETTEXT ignores the style, so ensure
    
    1307
    +            // that we do, selecting all the text if necessary to do the same
    
    1308
    +            // thing as WM_SETTEXT would do.
    
    1309
    +            if ( !selectionOnly )
    
    1310
    +            {
    
    1311
    +                start = 0;
    
    1312
    +                end = GetLastPosition();
    
    1313
    +                SetSelection(start, end); // Select everything.
    
    1314
    +
    
    1315
    +                selectionOnly = true;
    
    1316
    +            }
    
    1317
    +            else // We're already only overwriting the selection.
    
    1318
    +            {
    
    1319
    +                GetSelection(&start, &end);
    
    1320
    +            }
    
    1321
    +
    
    1305 1322
                 SetStyle(start, end, m_defaultStyle);
    
    1306 1323
             }
    
    1307 1324
         }
    

  • src/stc/ScintillaWX.cpp
    ... ... @@ -264,7 +264,6 @@ void ScintillaWX::Initialise() {
    264 264
         dropTarget->SetScintilla(this);
    
    265 265
         stc->SetDropTarget(dropTarget);
    
    266 266
     #endif // wxUSE_DRAG_AND_DROP
    
    267
    -    vs.extraFontFlag = true;   // UseAntiAliasing
    
    268 267
     
    
    269 268
         // Set up default OS X key mappings. Remember that SCI_CTRL stands for
    
    270 269
         // "Cmd" key here, as elsewhere in wx API, while SCI_ALT is the "Option"
    
    ... ... @@ -1326,15 +1325,6 @@ void ScintillaWX::ClipChildren(wxDC& WXUNUSED(dc), PRectangle WXUNUSED(rect))
    1326 1325
     }
    
    1327 1326
     
    
    1328 1327
     
    
    1329
    -void ScintillaWX::SetUseAntiAliasing(bool useAA) {
    
    1330
    -    vs.extraFontFlag = useAA;
    
    1331
    -    InvalidateStyleRedraw();
    
    1332
    -}
    
    1333
    -
    
    1334
    -bool ScintillaWX::GetUseAntiAliasing() {
    
    1335
    -    return vs.extraFontFlag != 0;
    
    1336
    -}
    
    1337
    -
    
    1338 1328
     void ScintillaWX::DoMarkerDefineBitmap(int markerNumber, const wxBitmap& bmp) {
    
    1339 1329
         if ( 0 <= markerNumber && markerNumber <= MARKER_MAX) {
    
    1340 1330
             // Build an RGBA buffer from bmp.
    

  • src/stc/ScintillaWX.h
    ... ... @@ -193,8 +193,6 @@ public:
    193 193
         void DoScrollToLine(int line);
    
    194 194
         void DoScrollToColumn(int column);
    
    195 195
         void ClipChildren(wxDC& dc, PRectangle rect);
    
    196
    -    void SetUseAntiAliasing(bool useAA);
    
    197
    -    bool GetUseAntiAliasing();
    
    198 196
         SurfaceData* GetSurfaceData() const {return m_surfaceData;}
    
    199 197
         void SetPaintAbandoned(){paintState = paintAbandoned;}
    
    200 198
         void DoMarkerDefineBitmap(int markerNumber, const wxBitmap& bmp);
    

  • src/stc/stc.cpp
    ... ... @@ -5375,11 +5375,11 @@ bool wxStyledTextCtrl::DoDropText(long x, long y, const wxString& data) {
    5375 5375
     
    
    5376 5376
     
    
    5377 5377
     void wxStyledTextCtrl::SetUseAntiAliasing(bool useAA) {
    
    5378
    -    m_swx->SetUseAntiAliasing(useAA);
    
    5378
    +    SetFontQuality(useAA ? wxSTC_EFF_QUALITY_DEFAULT : wxSTC_EFF_QUALITY_NON_ANTIALIASED);
    
    5379 5379
     }
    
    5380 5380
     
    
    5381 5381
     bool wxStyledTextCtrl::GetUseAntiAliasing() {
    
    5382
    -    return m_swx->GetUseAntiAliasing();
    
    5382
    +    return GetFontQuality() != wxSTC_EFF_QUALITY_NON_ANTIALIASED;
    
    5383 5383
     }
    
    5384 5384
     
    
    5385 5385
     void wxStyledTextCtrl::AnnotationClearLine(int line) {
    

  • src/stc/stc.cpp.in
    ... ... @@ -567,11 +567,11 @@ bool wxStyledTextCtrl::DoDropText(long x, long y, const wxString& data) {
    567 567
     
    
    568 568
     
    
    569 569
     void wxStyledTextCtrl::SetUseAntiAliasing(bool useAA) {
    
    570
    -    m_swx->SetUseAntiAliasing(useAA);
    
    570
    +    SetFontQuality(useAA ? wxSTC_EFF_QUALITY_DEFAULT : wxSTC_EFF_QUALITY_NON_ANTIALIASED);
    
    571 571
     }
    
    572 572
     
    
    573 573
     bool wxStyledTextCtrl::GetUseAntiAliasing() {
    
    574
    -    return m_swx->GetUseAntiAliasing();
    
    574
    +    return GetFontQuality() != wxSTC_EFF_QUALITY_NON_ANTIALIASED;
    
    575 575
     }
    
    576 576
     
    
    577 577
     void wxStyledTextCtrl::AnnotationClearLine(int line) {
    

  • src/stc/stc.interface.h.in
    ... ... @@ -272,15 +272,22 @@ public:
    272 272
         bool DoDropText(long x, long y, const wxString& data);
    
    273 273
     
    
    274 274
         /**
    
    275
    -       Specify whether anti-aliased fonts should be used.
    
    275
    +       Specify whether anti-aliasing should be used when rendering text.
    
    276 276
     
    
    277
    -      This will have no effect on some platforms, but on some (wxMac for
    
    278
    -      example) can greatly improve performance.
    
    277
    +       If @p useAA is true, sets @ref SetFontQuality() "font quality" to @c wxSTC_EFF_QUALITY_DEFAULT.
    
    278
    +
    
    279
    +       If @p useAA is false, sets @ref SetFontQuality() "font quality" to @c wxSTC_EFF_QUALITY_NON_ANTIALIASED.
    
    280
    +
    
    281
    +       Prefer using @ref SetFontQuality() directly in new code.
    
    279 282
         */
    
    280 283
         void SetUseAntiAliasing(bool useAA);
    
    281 284
     
    
    282 285
         /**
    
    283
    -       Returns the current UseAntiAliasing setting.
    
    286
    +       Returns whether anti-aliasing is enabled by @ref SetFontQuality() "font quality" setting.
    
    287
    +
    
    288
    +       This function returns true if GetFontQuality() is something other than @c wxSTC_EFF_QUALITY_NON_ANTIALIASED.
    
    289
    +
    
    290
    +       Prefer using @ref GetFontQuality() directly in new code.
    
    284 291
         */
    
    285 292
         bool GetUseAntiAliasing();
    
    286 293
     
    

  • src/unix/glegl.cpp
    ... ... @@ -611,7 +611,7 @@ void wxGLCanvasEGL::OnRealized()
    611 611
         {
    
    612 612
             if ( m_surface != EGL_NO_SURFACE )
    
    613 613
             {
    
    614
    -            eglDestroySurface(m_surface, m_display);
    
    614
    +            eglDestroySurface(m_display, m_surface);
    
    615 615
                 m_surface = EGL_NO_SURFACE;
    
    616 616
             }
    
    617 617
     
    
    ... ... @@ -700,7 +700,7 @@ wxGLCanvasEGL::~wxGLCanvasEGL()
    700 700
         }
    
    701 701
     #endif // GDK_WINDOWING_WAYLAND
    
    702 702
     
    
    703
    -    if ( m_surface )
    
    703
    +    if ( m_surface != EGL_NO_SURFACE )
    
    704 704
             eglDestroySurface(m_display, m_surface);
    
    705 705
     #ifdef GDK_WINDOWING_WAYLAND
    
    706 706
         DestroyWaylandSubsurface();
    

Reply all
Reply to author
Forward
0 new messages