From fd27c5399c536a4cc290eeb8a36c5f8b56374eec Mon Sep 17 00:00:00 2001 From: sabetts Date: Mon, 14 Apr 2003 02:15:05 +0000 Subject: * src/main.c (init_screen): print the display string for debugging. (main): parse the screen argument and process it. --- ChangeLog | 6 ++++++ NEWS | 4 ++++ src/actions.c | 4 ++-- src/main.c | 32 +++++++++++++++++++++++--------- src/manage.c | 11 ++++++++++- 5 files changed, 45 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index fb9ebeb..cb8933f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2003-04-13 Shawn Betts + * src/main.c (init_screen): print the display string for + debugging. + + * src/manage.c (current_screen): search for the current screen + using rp_current_screen. + * src/main.c (main): add switch case for the display command line option. (print_help): add --display option. Add text to demonstrate diff --git a/NEWS b/NEWS index bf7171c..940e020 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,10 @@ ratpoison NEWS --- history of user-visible changes. -*- outline -*- * Changes since 1.2.0-beta3 +** new command line argumen --screen +Now you can specify the screen you want to manage. By default +ratpoison manages all screens on the display. + ** new command line argument --display Now you can specify the display to connect to. diff --git a/src/actions.c b/src/actions.c index 4c4f221..ab47586 100644 --- a/src/actions.c +++ b/src/actions.c @@ -2802,7 +2802,7 @@ cmd_tmpwm (int interactive, char *data) have it. */ for (i=0; i= num_screens) @@ -610,12 +609,25 @@ main (int argc, char *argv[]) fprintf (stderr, "%d is an invalid screen for the display\n", screen_num); exit (EXIT_FAILURE); } + + /* we're only going to use one screen. */ + num_screens = 1; } - for (i=0; idisplay_string)); + s->screen_num = screen_num; s->root = RootWindow (dpy, screen_num); s->def_cmap = DefaultColormap (dpy, screen_num); diff --git a/src/manage.c b/src/manage.c index 059c480..f66f723 100644 --- a/src/manage.c +++ b/src/manage.c @@ -64,7 +64,16 @@ ungrab_prefix_key (Window w) screen_info* current_screen () { - return &screens[rp_current_screen]; + int i; + + for (i=0; i