From 17e5112975b8c4f1f32c989dbfbb4d43a0b6320e Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Sat, 14 Dec 2013 06:30:19 +0100 Subject: [PATCH] Added a menu option to highlight screen updates (see Xephyr(1)) --- tools/simulator.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tools/simulator.c b/tools/simulator.c index b93bae3..f9c28a0 100644 --- a/tools/simulator.c +++ b/tools/simulator.c @@ -105,6 +105,7 @@ static void _simulator_on_plug_added(gpointer data); static void _simulator_on_file_quit(gpointer data); static void _simulator_on_file_run(gpointer data); +static void _simulator_on_view_toggle_debugging_mode(gpointer data); static void _simulator_on_help_about(gpointer data); static void _simulator_on_help_contents(gpointer data); @@ -121,6 +122,13 @@ static const DesktopMenu _simulator_file_menu[] = { NULL, NULL, NULL, 0, 0 } }; +static const DesktopMenu _simulator_view_menu[] = +{ + { N_("_Rotate"), G_CALLBACK(_simulator_on_view_toggle_debugging_mode), + NULL, 0, 0 }, + { NULL, NULL, NULL, 0, 0 } +}; + static const DesktopMenu _simulator_help_menu[] = { { N_("_Contents"), G_CALLBACK(_simulator_on_help_contents), @@ -137,6 +145,7 @@ static const DesktopMenu _simulator_help_menu[] = static const DesktopMenubar _simulator_menubar[] = { { N_("_File"), _simulator_file_menu }, + { N_("_View"), _simulator_view_menu }, { N_("_Help"), _simulator_help_menu }, { NULL, NULL } }; @@ -796,6 +805,15 @@ static void _run_on_choose_response(GtkWidget * widget, gint arg1, } +/* simulator_on_view_toggle_debugging_mode */ +static void _simulator_on_view_toggle_debugging_mode(gpointer data) +{ + Simulator * simulator = data; + + kill(simulator->xephyr.pid, SIGUSR1); +} + + /* simulator_on_help_about */ static void _simulator_on_help_about(gpointer data) {