Fix dpi handling in sandbox

This commit is contained in:
Dan Walsh 2011-11-29 15:35:54 -05:00
parent c165d4c12a
commit 656414a035

View File

@ -111,7 +111,7 @@ index 1c458f1..96c6795 100644
install -m 4755 seunshare $(SBINDIR)/ install -m 4755 seunshare $(SBINDIR)/
-mkdir -p $(SHAREDIR) -mkdir -p $(SHAREDIR)
diff --git a/policycoreutils/sandbox/sandbox b/policycoreutils/sandbox/sandbox diff --git a/policycoreutils/sandbox/sandbox b/policycoreutils/sandbox/sandbox
index 486cd4e..6987652 100644 index 486cd4e..15a3ea3 100644
--- a/policycoreutils/sandbox/sandbox --- a/policycoreutils/sandbox/sandbox
+++ b/policycoreutils/sandbox/sandbox +++ b/policycoreutils/sandbox/sandbox
@@ -118,10 +118,30 @@ def reserve(level): @@ -118,10 +118,30 @@ def reserve(level):
@ -194,10 +194,10 @@ index 486cd4e..6987652 100644
if self.__options.X_ind: if self.__options.X_ind:
+ if self.__options.dpi: + if self.__options.dpi:
+ dpi = self.__options.dpi: + dpi = self.__options.dpi
+ else: + else:
+ import gtk + import gtk
+ dpi = gtk.settings_get_default().props.gtk_xft_dpi/1024 + dpi = str(gtk.settings_get_default().props.gtk_xft_dpi/1024)
+ +
xmodmapfile = self.__homedir + "/.xmodmap" xmodmapfile = self.__homedir + "/.xmodmap"
xd = open(xmodmapfile,"w") xd = open(xmodmapfile,"w")