mirror of
https://github.com/netbirdio/IronRDP.git
synced 2026-05-22 18:43:12 -07:00
fix(cliprdr-native): handle WM_ACTIVATEAPP in clipboard_subproc (#657)
This PR adds handling of `WM_ACTIVATEAPP` in `clipboard_subproc`. Previously, the function handled only `WM_ACTIVATE`.
This commit is contained in:
@@ -9,7 +9,7 @@ use windows::Win32::Foundation::{HWND, LPARAM, LRESULT, WPARAM};
|
||||
use windows::Win32::System::DataExchange::GetClipboardOwner;
|
||||
use windows::Win32::UI::Shell::DefSubclassProc;
|
||||
use windows::Win32::UI::WindowsAndMessaging::{
|
||||
KillTimer, SetTimer, WA_INACTIVE, WM_ACTIVATE, WM_CLIPBOARDUPDATE, WM_DESTROY, WM_RENDERALLFORMATS,
|
||||
KillTimer, SetTimer, WA_INACTIVE, WM_ACTIVATE, WM_ACTIVATEAPP, WM_CLIPBOARDUPDATE, WM_DESTROY, WM_RENDERALLFORMATS,
|
||||
WM_RENDERFORMAT, WM_TIMER,
|
||||
};
|
||||
|
||||
@@ -328,7 +328,7 @@ pub(crate) unsafe extern "system" fn clipboard_subproc(
|
||||
|
||||
match msg {
|
||||
// We need to keep track of window state to distinguish between local and remote copy
|
||||
WM_ACTIVATE => ctx.window_is_active = wparam.0 != WA_INACTIVE as usize, // `as` conversion is fine for constants
|
||||
WM_ACTIVATE | WM_ACTIVATEAPP => ctx.window_is_active = wparam.0 != WA_INACTIVE as usize, // `as` conversion is fine for constants
|
||||
// Sent by the OS when OS clipboard content is changed
|
||||
WM_CLIPBOARDUPDATE => {
|
||||
// SAFETY: `GetClipboardOwner` is always safe to call.
|
||||
|
||||
Reference in New Issue
Block a user