Fix base class of wxVListBox in the documentation It's wxVScrolledCanvas, a.k.a. wxVScrolled<wxWindow>, and not wxVScrolledWindow. Closes #25980.
wxQt: Bump the Qt version to 6.10.* in Github Actions Also, enable running the GUI tests with this version too. Closes #25975.
Fix wxFileDialog::GetDirectory() when using wxFD_MULTIPLE in wxGTK This function returned an empty string, override it to forward it to the file chooser actually being used to fix this. Closes #25976. Closes #25977.
Fix creating bitmap compatible with HDC in wxMSW Strangely enough, the code for creating bitmap compatible with the given HDC never actually did this, but always created bitmap compatible with the screen. Even though this was done like this ever since 2cf45d6944 (modifications for raw bitmap support and for using DIBs, 2003-03-22), it still seems wrong, so do use the HDC provided to this function if it is valid and only fall back on the screen HDC otherwise. This should hopefully result in no visible changes to behaviour, but makes things more logical and a tad more efficient as we avoid the unnecessary GetDC()/ReleaseDC() calls now.
Restore inactivation events for minimized windows in wxMSW Sending these events was disabled back in 8d6a2b3921 (Don't send wxActivateEvent for minimized windows in wxMSW, 2015-09-04) to solve the problem with errors when trying to restore focus while handling these messages, see #17128, but apparently some applications rely on getting these events. Restore sending them at least when the window is getting inactivated: this does no harm, i.e. doesn't bring back #17128, and may help. See https://github.com/wxWidgets/wxWidgets/commit/8d6a2b39214438fd42322b8f4083aed8bdccc3d1#commitcomment-166544846
| ... | ... | @@ -104,7 +104,7 @@ jobs: |
| 104 | 104 | cmake_qt_version: '5.15.*'
|
| 105 | 105 | skip_installation: true
|
| 106 | 106 | test_gui: 1
|
| 107 | - - name: MSW/MSVC wxQt 6.8
|
|
| 107 | + - name: MSW/MSVC wxQt 6.10
|
|
| 108 | 108 | runner: windows-latest
|
| 109 | 109 | no_sudo: 1
|
| 110 | 110 | cmake_defines: -DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe
|
| ... | ... | @@ -112,8 +112,9 @@ jobs: |
| 112 | 112 | cmake_samples: SOME
|
| 113 | 113 | cmake_tests: ALL
|
| 114 | 114 | cmake_build_toolkit: qt
|
| 115 | - cmake_qt_version: '6.8.*'
|
|
| 115 | + cmake_qt_version: '6.10.*'
|
|
| 116 | 116 | skip_installation: true
|
| 117 | + test_gui: 1
|
|
| 117 | 118 | - name: MSW/Clang wxMSW
|
| 118 | 119 | shell: msys2 {0}
|
| 119 | 120 | runner: windows-latest
|
| ... | ... | @@ -48,6 +48,7 @@ public: |
| 48 | 48 | virtual wxString GetFilename() const override;
|
| 49 | 49 | virtual void GetFilenames(wxArrayString& files) const override;
|
| 50 | 50 | virtual int GetFilterIndex() const override;
|
| 51 | + virtual wxString GetDirectory() const override;
|
|
| 51 | 52 | |
| 52 | 53 | virtual void SetMessage(const wxString& message) override;
|
| 53 | 54 | virtual void SetPath(const wxString& path) override;
|
| ... | ... | @@ -32,7 +32,7 @@ |
| 32 | 32 | |
| 33 | 33 | @see wxSimpleHtmlListBox, wxHtmlListBox
|
| 34 | 34 | */
|
| 35 | -class wxVListBox : public wxVScrolledWindow
|
|
| 35 | +class wxVListBox : public wxVScrolledCanvas
|
|
| 36 | 36 | {
|
| 37 | 37 | public:
|
| 38 | 38 | /**
|
| ... | ... | @@ -512,6 +512,11 @@ void wxFileDialog::GetPaths(wxArrayString& paths) const |
| 512 | 512 | GetFileChooser().GetPaths(paths);
|
| 513 | 513 | }
|
| 514 | 514 | |
| 515 | +wxString wxFileDialog::GetDirectory() const
|
|
| 516 | +{
|
|
| 517 | + return GetFileChooser().GetDirectory();
|
|
| 518 | +}
|
|
| 519 | + |
|
| 515 | 520 | void wxFileDialog::SetMessage(const wxString& message)
|
| 516 | 521 | {
|
| 517 | 522 | m_message = message;
|
| ... | ... | @@ -830,16 +830,21 @@ bool wxBitmap::DoCreate(int w, int h, int d, WXHDC hdc) |
| 830 | 830 | |
| 831 | 831 | GetBitmapData()->m_depth = d;
|
| 832 | 832 | }
|
| 833 | - else // No valid depth, create bitmap compatible with the screen
|
|
| 833 | + else // No valid depth, create bitmap compatible with the given one
|
|
| 834 | 834 | {
|
| 835 | - ScreenHDC dc;
|
|
| 836 | - hbmp = ::CreateCompatibleBitmap(dc, w, h);
|
|
| 835 | + // Use screen DC if no DC given.
|
|
| 836 | + const HDC hdcToUse = hdc ? (HDC)hdc : ::GetDC(nullptr);
|
|
| 837 | + |
|
| 838 | + hbmp = ::CreateCompatibleBitmap(hdcToUse, w, h);
|
|
| 837 | 839 | if ( !hbmp )
|
| 838 | 840 | {
|
| 839 | 841 | wxLogLastError(wxT("CreateCompatibleBitmap"));
|
| 840 | 842 | }
|
| 841 | 843 | |
| 842 | - GetBitmapData()->m_depth = wxDisplayDepth();
|
|
| 844 | + GetBitmapData()->m_depth = ::GetDeviceCaps(hdcToUse, BITSPIXEL);
|
|
| 845 | + |
|
| 846 | + if ( !hdc )
|
|
| 847 | + ::ReleaseDC(nullptr, hdcToUse);
|
|
| 843 | 848 | }
|
| 844 | 849 | #endif // !ALWAYS_USE_DIB
|
| 845 | 850 | }
|
| ... | ... | @@ -4341,7 +4341,7 @@ bool wxWindowMSW::HandleActivate(int state, |
| 4341 | 4341 | bool minimized,
|
| 4342 | 4342 | WXHWND WXUNUSED(activate))
|
| 4343 | 4343 | {
|
| 4344 | - if ( minimized )
|
|
| 4344 | + if ( state == WA_ACTIVE && minimized )
|
|
| 4345 | 4345 | {
|
| 4346 | 4346 | // Getting activation event when the window is minimized, as happens
|
| 4347 | 4347 | // e.g. when the window task bar icon is clicked, is unexpected and
|
—
View it on GitLab.
You're receiving this email because of your account on gitlab.com. Manage all notifications · Help