禁用窗口未将键盘输入消息传递给Linux中的父窗口 [英] Disabled window not passing keyboard input messages to parent window in Linux

查看:66
本文介绍了禁用窗口未将键盘输入消息传递给Linux中的父窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用wxWidgets,我有一个wxWindow,带有一个wxWindow子窗口。



如果我用EnableWindow(false)或Disable()禁用子窗口,父窗口在Windows中获取鼠标消息,但它在Linux中不起作用。在Linux中,父级不接收鼠标消息。



当禁用子窗口时,如何将鼠标单击发送给Linux中的父项?



我正在使用wxWidgets-2.8.12



我有完全相同的wxWidgets代码。当我在Windows中运行它时,当我单击禁用的窗口时,我在父窗口中获取该事件。当我在Linux中运行时,父进程没有得到事件。

解决方案

为什么你认为禁用的窗口应该处理任何输入?禁用已禁用,不应执行此操作。只需查看您的代码设计。您应该处理当前活动窗口的用户输入,并且始终启用活动窗口,否则它不活动。



-SA

Using wxWidgets, I have a wxWindow, with a wxWindow child window.

If I disable the child window with EnableWindow(false), or Disable(), the parent window gets the mouse messages in Windows, but it does not work in Linux. In Linux the parent does not receive the mouse messages.

What can I do to make a mouse click be sent to the parent in Linux when the child window is disabled?

I am using wxWidgets-2.8.12

I have exactly the same wxWidgets code. When I run it in Windows, I get the event in the parent window when I click on a disabled window. When I run it in Linux the parent does not get the event.

解决方案

Why do you think a disabled window should handle any input? Disabled is disabled, it should not do it. Just review your code design. You should handled the user input to the currently active window, and an active windows is always enabled, otherwise it is not active.

—SA


这篇关于禁用窗口未将键盘输入消息传递给Linux中的父窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆