mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-18 13:26:27 +00:00
terminal: ignore input without valid GUI mode
This prevents the potential corner case where the terminal receives input at a time when the window has no valid size and _text_screen_surface is not constructed.
This commit is contained in:
parent
4730312c1e
commit
d5f3cc6ec2
@ -364,6 +364,9 @@ void Terminal::Main::_handle_config()
|
|||||||
|
|
||||||
void Terminal::Main::_handle_input()
|
void Terminal::Main::_handle_input()
|
||||||
{
|
{
|
||||||
|
if (!_text_screen_surface.constructed())
|
||||||
|
return;
|
||||||
|
|
||||||
_gui.input.for_each_event([&] (Input::Event const &event) {
|
_gui.input.for_each_event([&] (Input::Event const &event) {
|
||||||
|
|
||||||
event.handle_absolute_motion([&] (int x, int y) {
|
event.handle_absolute_motion([&] (int x, int y) {
|
||||||
@ -485,7 +488,7 @@ void Terminal::Main::_handle_input()
|
|||||||
|
|
||||||
void Terminal::Main::_report_clipboard_selection()
|
void Terminal::Main::_report_clipboard_selection()
|
||||||
{
|
{
|
||||||
if (!_clipboard_reporter.constructed())
|
if (!_text_screen_surface.constructed() || !_clipboard_reporter.constructed())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_clipboard_reporter->generate([&] (Xml_generator &xml) {
|
_clipboard_reporter->generate([&] (Xml_generator &xml) {
|
||||||
|
Loading…
Reference in New Issue
Block a user