[vte] widget: No need to pass focus events to Terminal
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] widget: No need to pass focus events to Terminal
- Date: Fri, 1 May 2020 21:10:49 +0000 (UTC)
commit b404b62dc32be80dbbfc25606d5e10a170046e5d
Author: Christian Persch <chpe src gnome org>
Date: Fri May 1 23:08:42 2020 +0200
widget: No need to pass focus events to Terminal
All the information the Terminal needs is if it's an in or out
event, and that's already encoded in the function name.
src/vte.cc | 4 ++--
src/vteinternal.hh | 4 ++--
src/widget.hh | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/vte.cc b/src/vte.cc
index 84b5044e..82f758f8 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -7086,7 +7086,7 @@ Terminal::widget_mouse_release(MouseEvent const& event)
}
void
-Terminal::widget_focus_in(GdkEventFocus *event)
+Terminal::widget_focus_in()
{
_vte_debug_print(VTE_DEBUG_EVENTS, "Focus in.\n");
@@ -7115,7 +7115,7 @@ Terminal::widget_focus_in(GdkEventFocus *event)
}
void
-Terminal::widget_focus_out(GdkEventFocus *event)
+Terminal::widget_focus_out()
{
_vte_debug_print(VTE_DEBUG_EVENTS, "Focus out.\n");
diff --git a/src/vteinternal.hh b/src/vteinternal.hh
index 91a2b7c5..1b934106 100644
--- a/src/vteinternal.hh
+++ b/src/vteinternal.hh
@@ -1126,8 +1126,8 @@ public:
void widget_unrealize();
void widget_unmap();
void widget_style_updated();
- void widget_focus_in(GdkEventFocus *event);
- void widget_focus_out(GdkEventFocus *event);
+ void widget_focus_in();
+ void widget_focus_out();
bool widget_key_press(KeyEvent const& event);
bool widget_key_release(KeyEvent const& event);
bool widget_mouse_motion(MouseEvent const& event);
diff --git a/src/widget.hh b/src/widget.hh
index eed4da85..cf10c616 100644
--- a/src/widget.hh
+++ b/src/widget.hh
@@ -72,8 +72,8 @@ public:
int *natural_height) const noexcept {
m_terminal->widget_get_preferred_height(minimum_height, natural_height); }
void size_allocate(GtkAllocation *allocation) noexcept;
- void focus_in(GdkEventFocus *event) noexcept { m_terminal->widget_focus_in(event); }
- void focus_out(GdkEventFocus *event) noexcept { m_terminal->widget_focus_out(event); }
+ void focus_in(GdkEventFocus *event) noexcept { m_terminal->widget_focus_in(); }
+ void focus_out(GdkEventFocus *event) noexcept { m_terminal->widget_focus_out(); }
bool key_press(GdkEventKey *event) noexcept { return
m_terminal->widget_key_press(key_event_from_gdk(event)); }
bool key_release(GdkEventKey *event) noexcept { return
m_terminal->widget_key_release(key_event_from_gdk(event)); }
bool button_press(GdkEventButton *event) noexcept { return
m_terminal->widget_mouse_press(*mouse_event_from_gdk(reinterpret_cast<GdkEvent*>(event))); }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]