inputmethod: Use touch events to decide if the panel is shown not the state
Prefer hiding/showing the panel (i.e. the window) when not a touch event than stopping to make the inputmethod active. This way we remain compatible with non-virtualkeyboard inputmethods.