summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-11-06 23:12:25 +0000
committerOlivier Blin <oblin@mandriva.com>2008-11-06 23:12:25 +0000
commit1dd2000bfc41fbe1cbbebed403783ea442df56ed (patch)
tree44f8b33c10acf7c9dac7aec1fc5b62998e89d19d /lib
parent4c186c1048229781c65aa515178f47586089891a (diff)
downloaddrak3d-1dd2000bfc41fbe1cbbebed403783ea442df56ed.tar
drak3d-1dd2000bfc41fbe1cbbebed403783ea442df56ed.tar.gz
drak3d-1dd2000bfc41fbe1cbbebed403783ea442df56ed.tar.bz2
drak3d-1dd2000bfc41fbe1cbbebed403783ea442df56ed.tar.xz
drak3d-1dd2000bfc41fbe1cbbebed403783ea442df56ed.zip
set gstreamer videosink to ximagesink when using 3D desktop
(based on patch from Caio Begotti, #25572)
Diffstat (limited to 'lib')
-rw-r--r--lib/Xconfig/glx.pm13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/Xconfig/glx.pm b/lib/Xconfig/glx.pm
index d4ca894..39d2606 100644
--- a/lib/Xconfig/glx.pm
+++ b/lib/Xconfig/glx.pm
@@ -246,17 +246,28 @@ sub install {
$in->do_pkgs->ensure_are_installed(\@packages);
}
+#- FIXME: move in common.pm and factorize with network::network::proxy_configure_gnome
+sub _gconf_set {
+ my ($key, $type, $value) = @_;
+ -d "$::prefix/etc/gconf/2/" or return;
+ my $defaults_dir = "/etc/gconf/gconf.xml.local-defaults";
+ my $p_defaults_dir = "$::prefix$defaults_dir";
+ run_program::rooted($::prefix, 'gconftool-2', '>', '/dev/null', "--config-source=xml::$p_defaults_dir", "--direct", "--set", "--type=$type", if_($type eq "list", '--list-type', 'string'), $key, $value);
+}
+
sub write {
my ($glx) = @_;
my $server_start = member($glx->{method}, 'Xgl', 'Xmetisse');
+ my $wm_start = member($glx->{method}, qw(native Xgl Xmetisse));
addVarsInSh($::prefix . $compositing_server_config, {
COMPOSITING_SERVER_START => bool2yesno($server_start),
COMPOSITING_SERVER => $server_start && $glx->{method},
});
addVarsInSh($::prefix . $compositing_wm_config, {
- COMPOSITING_WM_START => bool2yesno(member($glx->{method}, qw(native Xgl Xmetisse))),
+ COMPOSITING_WM_START => bool2yesno($wm_start),
COMPOSITING_WM => $glx->{wm},
});
+ _gconf_set("/system/gstreamer/0.10/default/videosink", "string", $wm_start ? "ximagesink" : "autovideosink");
}
1;