 +        emit_terminal_screen_changed(1);        
  }
  
- void
+ /* Switch to normal screen and restore cursor (in this order). */

diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h
index d468f669..33488e21 100644
--- a/src/vte/vteterminal.h
+++ b/src/vte/vteterminal.h
@@ -104,8 +104,10 @@ struct _VteTerminalClass {
 
 	void (*bell)(VteTerminal* terminal);
 
+        void (*terminal_screen_changed)(VteTerminal* terminal);        
+
         /* Padding for future expansion. */
-        gpointer padding[16];

          * VteTerminal:allow-bold:
          *
diff --git a/src/vtegtk.hh b/src/vtegtk.hh
index c49754ef..3a13e308 100644
--- a/src/vtegtk.hh
+++ b/src/vtegtk.hh
@@ -52,6 +52,7 @@ enum {
         SIGNAL_RESIZE_WINDOW,
         SIGNAL_RESTORE_WINDOW,
         SIGNAL_SELECTION_CHANGED,
+        SIGNAL_TERMINAL_SCREEN_CHANGED,        
         SIGNAL_TEXT_DELETED,
         SIGNAL_TEXT_INSERTED,
         SIGNAL_TEXT_MODIFIED,
diff --git a/src/vteinternal.hh b/src/vteinternal.hh
index f8139131..35334e70 100644
--- a/src/vteinternal.hh
+++ b/src/vteinternal.hh
@@ -1359,6 +1359,8 @@ public:
         void select_empty(vte::grid::column_t col,
                           vte::grid::row_t row);
 
+        void emit_terminal_screen_changed(int screen);                          
+
 #define SEQUENCE_HANDLER(name) \
 	inline void seq_ ## name (vte::parser::Params const& params);
 #include "vteseq-list.hh"
diff --git a/src/vteseq.cc b/src/vteseq.cc
index 99b8bb37..b68b389d 100644
--- a/src/vteseq.cc
+++ b/src/vteseq.cc
@@ -186,6 +186,13 @@ VteTerminalPrivate::emit_resize_window(guint columns,
         g_signal_emit(m_terminal, signals[SIGNAL_RESIZE_WINDOW], 0, columns, rows);
 }
 
