summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-11-06 22:42:49 +0000
committerOlivier Blin <oblin@mandriva.com>2008-11-06 22:42:49 +0000
commit4c186c1048229781c65aa515178f47586089891a (patch)
tree8dc16b4d79253717f0f91656a2350a819d6139da /bin
parent4722182a3a69956a958fa86865e2ec68f09d4c0a (diff)
downloaddrak3d-4c186c1048229781c65aa515178f47586089891a.tar
drak3d-4c186c1048229781c65aa515178f47586089891a.tar.gz
drak3d-4c186c1048229781c65aa515178f47586089891a.tar.bz2
drak3d-4c186c1048229781c65aa515178f47586089891a.tar.xz
drak3d-4c186c1048229781c65aa515178f47586089891a.zip
add --auto/--method=<method>/--wm=<wm> command line options
Diffstat (limited to 'bin')
-rwxr-xr-xbin/drak3d10
1 files changed, 9 insertions, 1 deletions
diff --git a/bin/drak3d b/bin/drak3d
index 591bd48..ec10a6e 100755
--- a/bin/drak3d
+++ b/bin/drak3d
@@ -29,11 +29,17 @@ use common;
use interactive;
use Xconfig::glx;
use any;
+use Getopt::Long;
my $in = interactive->vnew('su');
my $glx = Xconfig::glx::detect_may_install($in) or $in->exit;
my $running_wm = any::running_window_manager();
+GetOptions(
+ "method=s" => \$glx->{method},
+ "wm=s" => \$glx->{wm},
+) or warn "invalid options";
+
my @advanced_settings = (
[ N_("A graphical server supporting OpenGL compositing should be selected."), 'methods', 'method', \@Xconfig::glx::gl_compositing_servers, 1 ],
[ N_("An OpenGL compositing window manager should be selected. It provides 3D desktop and compositing effects in window management, such as translucent windows and moving effects."), 'wms', 'wm', \@Xconfig::glx::gl_compositing_wms, 0 ],
@@ -136,7 +142,9 @@ sub choose_gtk {
}
my $res;
-if ($in->isa('interactive::gtk')) {
+if ($::auto) {
+ $res = 1;
+} elsif ($in->isa('interactive::gtk')) {
$res = choose_gtk($glx);
} else {
$res = Xconfig::glx::choose_interactive($in, $glx);