Skip to content

Commit

Permalink
添加tid打印
Browse files Browse the repository at this point in the history
  • Loading branch information
lynnux committed Aug 17, 2022
1 parent b8a210d commit 14cc9ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/gui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ use std::rc::Rc;
use winapi::shared::minwindef::*;
use winapi::um::processthreadsapi::*;
use winapi::um::winuser::*;
use crate::transparent::debug_output;
use crate::to_wstring;

// hotkey参考 https://blog.csdn.net/x356982611/article/details/16341797
static mut HACCEL: usize = 0;
Expand All @@ -12,6 +14,8 @@ pub fn popup(
pop_list: Vec<String>,
to_sel: usize,
) -> Option<usize> {
// 确认不是emacs gui线程,所以头次运行经常会失去焦点
// debug_output!(format!("popup tid: {}", winapi::um::processthreadsapi::GetCurrentThreadId()));
if unsafe { HACCEL == 0 } {
unsafe {
HACCEL =
Expand Down
1 change: 1 addition & 0 deletions src/transparent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ macro_rules! debug_output {
}
};
}
pub(crate) use debug_output; // 这样其它mod才能用

// https://github.com/duilib/duilib/blob/bbc817e0a134cda1dc5be6a38864257649273095/DuiLib/Utils/WndShadow.cpp#L197-L307
// msdn: https://docs.microsoft.com/en-us/windows/win32/winmsg/window-features
Expand Down

0 comments on commit 14cc9ef

Please sign in to comment.