widget: Move bell to Widget

parent 1eee87d2
......@@ -4499,10 +4499,8 @@ Terminal::remove_text_blink_timeout()
void
Terminal::beep()
{
if (m_audible_bell) {
GdkWindow *window = gtk_widget_get_window(m_widget);
gdk_window_beep(window);
}
if (m_audible_bell)
m_real_widget->beep();
}
guint
......@@ -8311,8 +8309,6 @@ Terminal::~Terminal()
int sel;
guint i;
_vte_debug_print(VTE_DEBUG_LIFECYCLE, "vte_terminal_finalize()\n");
/* Free the draw structure. */
if (m_draw != NULL) {
_vte_draw_free(m_draw);
......
......@@ -406,8 +406,9 @@ vte_terminal_init(VteTerminal *terminal)
static void
vte_terminal_finalize(GObject *object)
{
VteTerminal *terminal = VTE_TERMINAL (object);
_vte_debug_print(VTE_DEBUG_LIFECYCLE, "vte_terminal_finalize()\n");
VteTerminal *terminal = VTE_TERMINAL (object);
WIDGET(terminal)->~Widget();
/* Call the inherited finalize() method. */
......
......@@ -106,6 +106,13 @@ Widget::~Widget() noexcept
g_free(m_terminal);
}
void
Widget::beep() noexcept
{
if (realized())
gdk_window_beep(gtk_widget_get_window(m_widget));
}
GdkCursor*
Widget::create_cursor(GdkCursorType cursor_type) const noexcept
{
......
......@@ -85,6 +85,8 @@ public:
void screen_changed (GdkScreen *previous_screen) noexcept;
void settings_changed() noexcept;
void beep() noexcept;
void set_hadjustment(GtkAdjustment *adjustment) noexcept { m_terminal->widget_set_hadjustment(adjustment); }
GtkAdjustment* get_hadjustment() const noexcept { return m_terminal->m_hadjustment; }
void set_vadjustment(GtkAdjustment *adjustment) noexcept { m_terminal->widget_set_vadjustment(adjustment); }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment