Re: Display option in multiscreen (session management)



"JAYARAJ P R" <jayaraj rajappan wipro com> writes: 
> 1. All GNOME applications need to do the following in their save_session
> routine.
> 
> a)get the DISPLAY environment variable using getenv ("DISPLAY")
> b)call gnome_client_set_environment (client, "DISPLAY", DISPLAY)
>

Ugh, no. 

Just make libgnomeui/gnome-client.c do this instead of each app. Also,
use the canonical display name, from DisplayString(GDK_DISPLAY()). (Do
not use XDisplayName() or getenv(DISPLAY)).
  
> 2. If the application is invoked with the --display argument and it uses
> gtk_init(), then we need to do a setenv (DISPLAY, ":<display num>.<screen
> num>")
> before the call to gtk_init(), since gtk_init() seems to strip off
> the --display
> argument. The --display argument takes precedence over the DISPLAY
> environment
> variable.

Don't do this, just do DisplayString(GDK_DISPLAY()).

Havoc



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]