Fix tests build when using built-in CATCH This was broken in 01ca081d57 (Allow using system CATCH2 library in configure, 2023-06-15) where a wrong include path was used in this case. See #23654.
Fix checking for display connected status in wxMSW This fixes a typo in HMONITOR comparison inadvertently introduced during refactoring in 3d15cc395d (Fix wxDisplay invalidation on connected displays change, 2025-05-15), see #25407. Also add some comments to this function. See #25396.
Fix check for COM apartment compatibility with IFileDialog Only the first call to ::CoInitializeEx() returns RPC_E_CHANGED_MODE, so remember the result of calling CanBeUsedWithAnOwner() because it wouldn't return the correct value if we called it again. See #23578.
Error in configure if wxSecretStore requested but not available Allow specifying --enable-secretstore to ensure that the library has wxSecretStore support. Still continue with just a warning by default. Closes #25455.
| ... | ... | @@ -4078,6 +4078,7 @@ DEFAULT_wxUSE_HOTKEY=auto |
| 4078 | 4078 | DEFAULT_wxUSE_MEDIACTRL=auto
|
| 4079 | 4079 | DEFAULT_wxUSE_METAFILE=auto
|
| 4080 | 4080 | DEFAULT_wxUSE_OPENGL=auto
|
| 4081 | +DEFAULT_wxUSE_SECRETSTORE=auto
|
|
| 4081 | 4082 | DEFAULT_wxUSE_WEBVIEW_EDGE=no
|
| 4082 | 4083 | |
| 4083 | 4084 | DEFAULT_wxUSE_UNIVERSAL_BINARY=no
|
| ... | ... | @@ -36048,7 +36049,7 @@ fi |
| 36048 | 36049 | fi
|
| 36049 | 36050 | |
| 36050 | 36051 | |
| 36051 | -if test "$wxUSE_SECRETSTORE" = "yes"; then
|
|
| 36052 | +if test "$wxUSE_SECRETSTORE" != "no"; then
|
|
| 36052 | 36053 | if test "$wxUSE_MSW" != "1" -a "$wxUSE_OSX_COCOA" != 1; then
|
| 36053 | 36054 | |
| 36054 | 36055 | pkg_failed=no
|
| ... | ... | @@ -36110,7 +36111,11 @@ fi |
| 36110 | 36111 | echo "$LIBSECRET_PKG_ERRORS" >&5
|
| 36111 | 36112 | |
| 36112 | 36113 | |
| 36113 | - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libsecret not found, wxSecretStore won't be available" >&5
|
|
| 36114 | + if test "$wxUSE_SECRETSTORE" = "yes"; then
|
|
| 36115 | + as_fn_error $? "wxSecretStore support requested but libsecret was not found" "$LINENO" 5
|
|
| 36116 | + fi
|
|
| 36117 | + |
|
| 36118 | + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libsecret not found, wxSecretStore won't be available" >&5
|
|
| 36114 | 36119 | $as_echo "$as_me: WARNING: libsecret not found, wxSecretStore won't be available" >&2;}
|
| 36115 | 36120 | wxUSE_SECRETSTORE=no
|
| 36116 | 36121 | |
| ... | ... | @@ -36119,7 +36124,11 @@ elif test $pkg_failed = untried; then |
| 36119 | 36124 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
| 36120 | 36125 | $as_echo "no" >&6; }
|
| 36121 | 36126 | |
| 36122 | - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libsecret not found, wxSecretStore won't be available" >&5
|
|
| 36127 | + if test "$wxUSE_SECRETSTORE" = "yes"; then
|
|
| 36128 | + as_fn_error $? "wxSecretStore support requested but libsecret was not found" "$LINENO" 5
|
|
| 36129 | + fi
|
|
| 36130 | + |
|
| 36131 | + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libsecret not found, wxSecretStore won't be available" >&5
|
|
| 36123 | 36132 | $as_echo "$as_me: WARNING: libsecret not found, wxSecretStore won't be available" >&2;}
|
| 36124 | 36133 | wxUSE_SECRETSTORE=no
|
| 36125 | 36134 | |
| ... | ... | @@ -36136,7 +36145,7 @@ $as_echo "yes" >&6; } |
| 36136 | 36145 | fi
|
| 36137 | 36146 | fi
|
| 36138 | 36147 | |
| 36139 | - if test "$wxUSE_SECRETSTORE" = "yes"; then
|
|
| 36148 | + if test "$wxUSE_SECRETSTORE" != "no"; then
|
|
| 36140 | 36149 | if test "$USE_DARWIN" = 1; then
|
| 36141 | 36150 | LIBS="-framework Security $LIBS"
|
| 36142 | 36151 | fi
|
| ... | ... | @@ -43975,7 +43984,7 @@ $as_echo "no" >&6; } |
| 43975 | 43984 | fi
|
| 43976 | 43985 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
| 43977 | 43986 | $as_echo "yes" >&6; }
|
| 43978 | - CATCH2_CFLAGS="-I$wx_top_builddir/3rdparty/catch/single_include"
|
|
| 43987 | + CATCH2_CFLAGS="-I\$(top_srcdir)/3rdparty/catch/single_include"
|
|
| 43979 | 43988 | fi
|
| 43980 | 43989 | |
| 43981 | 43990 |
| ... | ... | @@ -329,6 +329,7 @@ DEFAULT_wxUSE_HOTKEY=auto |
| 329 | 329 | DEFAULT_wxUSE_MEDIACTRL=auto
|
| 330 | 330 | DEFAULT_wxUSE_METAFILE=auto
|
| 331 | 331 | DEFAULT_wxUSE_OPENGL=auto
|
| 332 | +DEFAULT_wxUSE_SECRETSTORE=auto
|
|
| 332 | 333 | DEFAULT_wxUSE_WEBVIEW_EDGE=no
|
| 333 | 334 | |
| 334 | 335 | dnl Mac/Cocoa users need to enable building universal binaries explicitly
|
| ... | ... | @@ -5139,7 +5140,7 @@ dnl --------------------------------------------------------------------------- |
| 5139 | 5140 | dnl Secret storage
|
| 5140 | 5141 | dnl ---------------------------------------------------------------------------
|
| 5141 | 5142 | |
| 5142 | -if test "$wxUSE_SECRETSTORE" = "yes"; then
|
|
| 5143 | +if test "$wxUSE_SECRETSTORE" != "no"; then
|
|
| 5143 | 5144 | dnl The required APIs are always available under MSW and OS X but we must
|
| 5144 | 5145 | dnl have GNOME libsecret under Unix to be able to compile this class.
|
| 5145 | 5146 | if test "$wxUSE_MSW" != "1" -a "$wxUSE_OSX_COCOA" != 1; then
|
| ... | ... | @@ -5152,13 +5153,19 @@ if test "$wxUSE_SECRETSTORE" = "yes"; then |
| 5152 | 5153 | LIBS="`echo $LIBSECRET_LIBS | sed s/-lsecret-1//g` $LIBS"
|
| 5153 | 5154 | ],
|
| 5154 | 5155 | [
|
| 5156 | + if test "$wxUSE_SECRETSTORE" = "yes"; then
|
|
| 5157 | + AC_MSG_ERROR([wxSecretStore support requested but libsecret was not found])
|
|
| 5158 | + fi
|
|
| 5159 | + |
|
| 5160 | + dnl By default, i.e. if --enable-secretstore wasn't explicitly
|
|
| 5161 | + dnl specified, continue without it.
|
|
| 5155 | 5162 | AC_MSG_WARN([libsecret not found, wxSecretStore won't be available])
|
| 5156 | 5163 | wxUSE_SECRETSTORE=no
|
| 5157 | 5164 | ]
|
| 5158 | 5165 | )
|
| 5159 | 5166 | fi
|
| 5160 | 5167 | |
| 5161 | - if test "$wxUSE_SECRETSTORE" = "yes"; then
|
|
| 5168 | + if test "$wxUSE_SECRETSTORE" != "no"; then
|
|
| 5162 | 5169 | if test "$USE_DARWIN" = 1; then
|
| 5163 | 5170 | LIBS="-framework Security $LIBS"
|
| 5164 | 5171 | fi
|
| ... | ... | @@ -8318,7 +8325,7 @@ will use built-in instead]) |
| 8318 | 8325 | to fix this.])
|
| 8319 | 8326 | fi
|
| 8320 | 8327 | AC_MSG_RESULT([yes])
|
| 8321 | - CATCH2_CFLAGS="-I$wx_top_builddir/3rdparty/catch/single_include"
|
|
| 8328 | + CATCH2_CFLAGS="-I\$(top_srcdir)/3rdparty/catch/single_include"
|
|
| 8322 | 8329 | fi
|
| 8323 | 8330 | |
| 8324 | 8331 | AC_SUBST(CATCH2_CFLAGS)
|
| ... | ... | @@ -152,9 +152,12 @@ int wxDirDialog::ShowModal() |
| 152 | 152 | // Use IFileDialog under new enough Windows, it's more user-friendly.
|
| 153 | 153 | int rc;
|
| 154 | 154 | #if wxUSE_IFILEOPENDIALOG
|
| 155 | - rc = wxMSWImpl::wxIFileDialog::CanBeUsedWithAnOwner()
|
|
| 156 | - ? ShowIFileOpenDialog(hWndParent)
|
|
| 157 | - : wxID_NONE;
|
|
| 155 | + // It is crucial for this variable to be static, CanBeUsedWithAnOwner()
|
|
| 156 | + // only detects COM apartment type change once, so we shouldn't call it
|
|
| 157 | + // again if it returned false the first time.
|
|
| 158 | + static bool
|
|
| 159 | + s_canUseIFileDialog = wxMSWImpl::wxIFileDialog::CanBeUsedWithAnOwner();
|
|
| 160 | + rc = s_canUseIFileDialog ? ShowIFileOpenDialog(hWndParent) : wxID_NONE;
|
|
| 158 | 161 | |
| 159 | 162 | if ( rc == wxID_NONE )
|
| 160 | 163 | #endif // wxUSE_IFILEOPENDIALOG
|
| ... | ... | @@ -505,16 +505,24 @@ bool wxDisplayMSW::ChangeMode(const wxVideoMode& mode) |
| 505 | 505 | bool
|
| 506 | 506 | wxDisplayMSW::DoRefreshOnDisplayChange(const wxVector<wxDisplayInfo>& displays)
|
| 507 | 507 | {
|
| 508 | + // Try to find this display in the list of the currently available ones.
|
|
| 508 | 509 | for ( size_t n = 0; n < displays.size(); ++n )
|
| 509 | 510 | {
|
| 510 | - if ( displays[n].hmon == displays[n].hmon )
|
|
| 511 | + if ( m_info.hmon == displays[n].hmon )
|
|
| 511 | 512 | {
|
| 513 | + // We did find it, update it just in case its characteristics have
|
|
| 514 | + // changed.
|
|
| 512 | 515 | m_info = displays[n];
|
| 516 | + |
|
| 517 | + // And, importantly, also update its index which could have changed
|
|
| 518 | + // due to a previous monitor disconnection.
|
|
| 513 | 519 | m_index = n;
|
| 520 | + |
|
| 514 | 521 | return true;
|
| 515 | 522 | }
|
| 516 | 523 | }
|
| 517 | 524 | |
| 525 | + // This display is not connected any more, so mark it as such.
|
|
| 518 | 526 | Disconnect();
|
| 519 | 527 | return false;
|
| 520 | 528 | }
|
—
View it on GitLab.
You're receiving this email because of your account on gitlab.com. Manage all notifications · Help