File diff r4548:6a33e364fba5 → r4549:76b9213799ac
window.c
Show inline comments
 
@@ -1262,27 +1262,27 @@ static void SendWindowMessageW(Window *w
 
 * @param lparam Specifies additional message-specific information
 
 */
 
void SendWindowMessage(WindowClass wnd_class, WindowNumber wnd_num, uint msg, uint wparam, uint lparam)
 
{
 
	Window *w = FindWindowById(wnd_class, wnd_num);
 
	if (w != NULL) SendWindowMessageW(w, msg, wparam, lparam);
 
}
 

	
 
static void HandleKeypress(uint32 key)
 
{
 
	Window *w;
 
	WindowEvent we;
 
 /* Stores if a window with a textfield for typing is open
 
  * If this is the case, keypress events are only passed to windows with text fields and
 
	* to thein this main toolbar. */
 
	/* Stores if a window with a textfield for typing is open
 
	 * If this is the case, keypress events are only passed to windows with text fields and
 
	 * to thein this main toolbar. */
 
	bool query_open = false;
 

	
 
	// Setup event
 
	we.keypress.event = WE_KEYPRESS;
 
	we.keypress.ascii = key & 0xFF;
 
	we.keypress.keycode = key >> 16;
 
	we.keypress.cont = true;
 

	
 
	// check if we have a query string window open before allowing hotkeys
 
	if (FindWindowById(WC_QUERY_STRING,       0) != NULL ||
 
			FindWindowById(WC_SEND_NETWORK_MSG,   0) != NULL ||
 
			FindWindowById(WC_GENERATE_LANDSCAPE, 0) != NULL ||