rpms/wallpapoz/devel wallpapoz-0.4.1-rev92-animated-image.patch, NONE, 1.1 wallpapoz-0.4.1-rev92-compiz-respawn.patch, 1.3, 1.4 wallpapoz-0.4.1-rev92-kill-daemon-without-x.patch, 1.1, 1.2 wallpapoz-0.4.1-rev92-kill-multiple-daemon.patch, 1.1, 1.2 wallpapoz.spec, 1.32, 1.33
Mamoru Tasaka
mtasaka at fedoraproject.org
Fri Jun 11 19:44:37 UTC 2010
Author: mtasaka
Update of /cvs/extras/rpms/wallpapoz/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv4840/devel
Modified Files:
wallpapoz-0.4.1-rev92-compiz-respawn.patch
wallpapoz-0.4.1-rev92-kill-daemon-without-x.patch
wallpapoz-0.4.1-rev92-kill-multiple-daemon.patch
wallpapoz.spec
Added Files:
wallpapoz-0.4.1-rev92-animated-image.patch
Log Message:
* Sat Jun 12 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.4.1-21.svn92_trunk
- Handle animated image file (bug 602921)
wallpapoz-0.4.1-rev92-animated-image.patch:
wallpapoz | 27 ++++++++++++++++++++++-----
1 file changed, 22 insertions(+), 5 deletions(-)
--- NEW FILE wallpapoz-0.4.1-rev92-animated-image.patch ---
--- wallpapoz-0.4.1-svn92_trunk/src/wallpapoz.anime 2010-06-12 04:26:39.000000000 +0900
+++ wallpapoz-0.4.1-svn92_trunk/src/wallpapoz 2010-06-12 04:13:43.000000000 +0900
@@ -1236,15 +1236,32 @@
filename = self.store.get_value(position_iter, 1)
# display image properly
+ from glib import GError as glib_GError
try:
- im = Image.open(filename)
- # keep image proportions
- if im.size[0] > im.size[1]:
- self.image_widget.set_from_pixbuf(gtk.gdk.pixbuf_new_from_file_at_size(filename, 400, int((float(im.size[1])/im.size[0]) * 400)))
+ anime = gtk.gdk.PixbufAnimation(filename)
+
+ if anime.is_static_image() :
+ im = Image.open(filename)
+ # keep image proportions
+ if im.size[0] > im.size[1]:
+ self.image_widget.set_from_pixbuf(gtk.gdk.pixbuf_new_from_file_at_size(filename, 400, int((float(im.size[1])/im.size[0]) * 400)))
+ else:
+ self.image_widget.set_from_pixbuf(gtk.gdk.pixbuf_new_from_file_at_size(filename, int(float(im.size[1])/im.size[0] * 300), 300))
+
else:
- self.image_widget.set_from_pixbuf(gtk.gdk.pixbuf_new_from_file_at_size(filename, int(float(im.size[1])/im.size[0] * 300), 300))
+ width = anime.get_width()
+ height = anime.get_height()
+ static_im = anime.get_static_image()
+ if width > height:
+ self.image_widget.set_from_pixbuf(static_im.scale_simple(400, int((float(height)/width)*400),gtk.gdk.INTERP_BILINEAR))
+ else:
+ self.image_widget.set_from_pixbuf(static_im.scale_simple(int((float(width)/height)*300),300,gtk.gdk.INTERP_BILINEAR))
+
except IOError:
self.image_widget.clear()
+ except glib_GError, (msg):
+ print msg
+ self.image_widget.clear()
# display image filename
self.wallpaper_filename.set_markup("<b>" + os.path.basename(filename) + "</b>")
wallpapoz-0.4.1-rev92-compiz-respawn.patch:
share/wallpapoz/lib/wallpapoz_system.py | 44 ++++++++++++++++++++++++++++++--
src/daemon_wallpapoz | 11 +++++++-
2 files changed, 52 insertions(+), 3 deletions(-)
Index: wallpapoz-0.4.1-rev92-compiz-respawn.patch
===================================================================
RCS file: /cvs/extras/rpms/wallpapoz/devel/wallpapoz-0.4.1-rev92-compiz-respawn.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- wallpapoz-0.4.1-rev92-compiz-respawn.patch 9 Feb 2010 16:45:52 -0000 1.3
+++ wallpapoz-0.4.1-rev92-compiz-respawn.patch 11 Jun 2010 19:44:36 -0000 1.4
@@ -1,6 +1,6 @@
--- wallpapoz-0.4.1-svn92_trunk/share/wallpapoz/lib/wallpapoz_system.py.compiz 2009-08-30 01:22:07.000000000 +0900
-+++ wallpapoz-0.4.1-svn92_trunk/share/wallpapoz/lib/wallpapoz_system.py 2010-02-10 01:25:43.000000000 +0900
-@@ -25,6 +25,7 @@
++++ wallpapoz-0.4.1-svn92_trunk/share/wallpapoz/lib/wallpapoz_system.py 2010-03-18 00:40:58.000000000 +0900
+@@ -25,18 +25,40 @@
# achieve goal by calling external program
import os
@@ -8,19 +8,70 @@
import string
class WallpapozSystem:
-@@ -73,6 +74,11 @@
- if self.geometry_height!=self.screen_height:
+
++ # Define static variable to save the initial value of self.beryl
++ static_check_beryl_called_p = False
++ static_beryl = False
++
++ # Also for total_workspaces
++ static_finding_total_workspaces_called_p = False
++ static_total_workspaces = 0
++
+ def __init__(self):
+ self.wallpaper_style = 'scaled'
+ self.finding_screen_resolution()
++
++ # Save the first result of self.beryl, and respawn daemon
++ # if self.beryl value changed.
+ self.check_beryl()
++ if not WallpapozSystem.static_check_beryl_called_p :
++ WallpapozSystem.static_check_beryl_called_p = True
++ WallpapozSystem.static_beryl = self.beryl
++
+ if self.beryl:
+ self.finding_row_and_column()
+ self.finding_total_workspaces()
+
++ # Check if total_workspaces changed only here
++ if WallpapozSystem.static_total_workspaces != self.total_workspaces:
++ print "daemon_wallpapoz: the number of total workspaces changed during initialization process."
++ print "daemon_wallpapoz: respawning daemon_wallpapoz."
++ self.respawn_system()
++
+ def set_style(self, style):
+ self.wallpaper_style = style
+
+@@ -57,6 +79,11 @@
+ else:
+ self.total_workspaces = int(os.popen("xprop -root _NET_NUMBER_OF_DESKTOPS").read()[36:38])
+
++ # Save this total_workspaces value
++ if not WallpapozSystem.static_finding_total_workspaces_called_p:
++ WallpapozSystem.static_finding_total_workspaces_called = True
++ WallpapozSystem.static_total_workspaces = self.total_workspaces
++
+ ## class method to find if user use beryl in his system or not
+ def check_beryl(self):
+ raw_geometry = os.popen('xprop -root _NET_DESKTOP_GEOMETRY').read()
+@@ -69,10 +96,15 @@
+ self.beryl = False
+ if self.geometry_width!=self.screen_width:
+ self.beryl = True
+- return
+- if self.geometry_height!=self.screen_height:
++ elif self.geometry_height!=self.screen_height:
self.beryl = True
-+ def beryl_status(self, update = False):
-+ if update:
-+ self.check_beryl()
-+ return self.beryl
++ # respawn daemon if self.beryl value changed
++ if WallpapozSystem.static_check_beryl_called_p:
++ if WallpapozSystem.static_beryl != self.beryl:
++ print "Compiz status changed, respawning daemon_wallpapoz."
++ self.respawn_system()
+
## class method to find how many rows and columns of workspaces
def finding_row_and_column(self):
self.row_workspaces = self.geometry_height / self.screen_height
-@@ -113,3 +119,11 @@
+@@ -113,3 +145,11 @@
return True
else:
return False
@@ -31,35 +82,20 @@
+ os.execvp('daemon_wallpapoz', new_argv)
+ print "os.execvp failed, exiting..."
+ sys.exit(1)
-+ return
++
--- wallpapoz-0.4.1-svn92_trunk/src/daemon_wallpapoz.compiz 2009-08-30 01:22:07.000000000 +0900
-+++ wallpapoz-0.4.1-svn92_trunk/src/daemon_wallpapoz 2010-02-10 01:30:29.000000000 +0900
-@@ -107,6 +107,9 @@
- delay = 60 * float(wallpapozxml.delay())
- randomvar = int(wallpapozxml.is_random())
-
-+ # get current compiz status
-+ previous_beryl_status = wallpapoz_system.beryl_status()
-+
- # how many workspace we use
- if conf_type == "workspace":
- # cleansing
-@@ -134,11 +137,25 @@
++++ wallpapoz-0.4.1-svn92_trunk/src/daemon_wallpapoz 2010-03-18 00:25:42.000000000 +0900
+@@ -134,11 +134,20 @@
if wallpapozxml.get_type() == "workspace":
while True:
# don't get rush
- time.sleep(1)
-+ # sleep a bit more
++ # sleep a bit more
+ time.sleep(2)
+
-+ # check if compiz is working every loop
-+ cur_beryl_status = wallpapoz_system.beryl_status(update = True)
-+ if previous_beryl_status != cur_beryl_status:
-+ # compiz status changed, respawn daemon_wallpapoz
-+ print "Compiz status changed, respawning daemon_wallpapoz."
-+ wallpapoz_system.respawn_system()
-+
-+ previous_beryl_status = cur_beryl_status
++ # check if compiz is working every loop (and
++ # if compiz status changed, respawn daemon)
++ wallpapoz_system.check_beryl()
# what workspace we are in now?
cur_desk = wallpapoz_system.current_desktop()
wallpapoz-0.4.1-rev92-kill-daemon-without-x.patch:
wallpapoz_system.py | 46 +++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 41 insertions(+), 5 deletions(-)
Index: wallpapoz-0.4.1-rev92-kill-daemon-without-x.patch
===================================================================
RCS file: /cvs/extras/rpms/wallpapoz/devel/wallpapoz-0.4.1-rev92-kill-daemon-without-x.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- wallpapoz-0.4.1-rev92-kill-daemon-without-x.patch 8 Feb 2010 18:32:04 -0000 1.1
+++ wallpapoz-0.4.1-rev92-kill-daemon-without-x.patch 11 Jun 2010 19:44:36 -0000 1.2
@@ -1,5 +1,5 @@
---- wallpapoz-0.4.1-svn92_trunk/share/wallpapoz/lib/wallpapoz_system.py.kill_nox 2010-02-09 03:05:24.000000000 +0900
-+++ wallpapoz-0.4.1-svn92_trunk/share/wallpapoz/lib/wallpapoz_system.py 2010-02-09 03:07:00.000000000 +0900
+--- wallpapoz-0.4.1-svn92_trunk/share/wallpapoz/lib/wallpapoz_system.py.kill_nox 2010-03-18 00:52:45.000000000 +0900
++++ wallpapoz-0.4.1-svn92_trunk/share/wallpapoz/lib/wallpapoz_system.py 2010-03-18 01:00:30.000000000 +0900
@@ -24,9 +24,11 @@
## wallpapoz_system.py -- finds current desktop and changes wallpaper
# achieve goal by calling external program
@@ -12,29 +12,41 @@
class WallpapozSystem:
-@@ -38,12 +40,34 @@
- self.finding_row_and_column()
- self.finding_total_workspaces()
-
-+ def exec_cmd(self, cmd):
-+ p = subprocess.Popen(
-+ cmd,
-+ stdout = subprocess.PIPE,
-+ stderr = subprocess.PIPE,
-+ shell = True
-+ )
+@@ -59,12 +61,46 @@
+ print "daemon_wallpapoz: respawning daemon_wallpapoz."
+ self.respawn_system()
+
++ def exec_cmd_under_X(self, cmd):
++ try:
++ p = subprocess.Popen(
++ cmd,
++ stdout = subprocess.PIPE,
++ stderr = subprocess.PIPE,
++ shell = True
++ )
++ except OSError:
++ print "daemon_wallpapoz: fork failed for %s, exiting." %cmd
++ sys.exit(1)
+
+ pstdout = p.stdout.read()
+ pstderr = p.stderr.read()
+ ret = p.wait()
+
-+ if ( ret != 0 ) and ( ret & 0xFF ):
-+ err_str = 'unable to open display'
++ kill_daemon = False
+
-+ if pstderr.find(err_str) >= 0:
++ if (ret != 0) and (ret & 0xFF):
++ print "daemon_wallpapoz: %s returned status %i." %(cmd, ret)
++ print "daemon_wallpapoz: error message: %s" %pstderr
++ kill_daemon = True
++
++ if (cmd.find('xprop') >= 0) and (pstdout.find('no such atom') >= 0):
++ kill_daemon = True
++
++ if kill_daemon:
+ ## No X resource available, kill daemon_wallpapoz
-+ cpid = os.getpid()
-+ os.kill (cpid, signal.SIGTERM)
++ print "daemon_wallpapoz: X resource seems no longer available."
++ print "daemon_wallpapoz: killing daemon_wallpapoz."
++ sys.exit(1)
+
+ return pstdout
+
@@ -44,39 +56,43 @@
## class method to find monitor resolution
def finding_screen_resolution(self):
- raw_resolution = os.popen('xwininfo -root').read()
-+ raw_resolution = self.exec_cmd('xwininfo -root')
++ raw_resolution = self.exec_cmd_under_X('xwininfo -root')
start_width = raw_resolution.find('Width')
end_width = raw_resolution.find('\n',start_width)
start_height = raw_resolution.find('Height')
-@@ -56,11 +80,11 @@
+@@ -77,7 +113,7 @@
if self.beryl:
self.total_workspaces = self.row_workspaces * self.column_workspaces
else:
- self.total_workspaces = int(os.popen("xprop -root _NET_NUMBER_OF_DESKTOPS").read()[36:38])
-+ self.total_workspaces = int(self.exec_cmd("xprop -root _NET_NUMBER_OF_DESKTOPS")[36:38])
++ self.total_workspaces = int(self.exec_cmd_under_X("xprop -root _NET_NUMBER_OF_DESKTOPS")[36:38])
+
+ # Save this total_workspaces value
+ if not WallpapozSystem.static_finding_total_workspaces_called_p:
+@@ -86,7 +122,7 @@
## class method to find if user use beryl in his system or not
def check_beryl(self):
- raw_geometry = os.popen('xprop -root _NET_DESKTOP_GEOMETRY').read()
-+ raw_geometry = self.exec_cmd('xprop -root _NET_DESKTOP_GEOMETRY')
++ raw_geometry = self.exec_cmd_under_X('xprop -root _NET_DESKTOP_GEOMETRY')
# output of xprop -root _NET_DESKTOP_GEOMETRY is '_NET_DESKTOP_GEOMETRY(CARDINAL) = 1024, 768\n'
# and we just need the '1024, 768' part
raw_geometry = raw_geometry[34:raw_geometry.find('\n')]
-@@ -90,7 +114,7 @@
+@@ -117,7 +153,7 @@
## class method to know what workspace we are in now
def current_desktop(self):
if self.beryl:
- raw_viewport = os.popen('xprop -root _NET_DESKTOP_VIEWPORT').read()
-+ raw_viewport = self.exec_cmd('xprop -root _NET_DESKTOP_VIEWPORT')
++ raw_viewport = self.exec_cmd_under_X('xprop -root _NET_DESKTOP_VIEWPORT')
# output of xprop -root _NET_DESKTOP_VIEWPORT is '_NET_DESKTOP_VIEWPORT(CARDINAL) = 1024, 768\n'
# and we just need the '1024, 768' part
raw_viewport = raw_viewport[34:raw_viewport.find('\n')]
-@@ -99,7 +123,7 @@
+@@ -126,7 +162,7 @@
y_pos = int(viewport[1]) / self.screen_height
workspace = x_pos + self.column_workspaces * y_pos
else:
- raw_workspace = os.popen('xprop -root _NET_CURRENT_DESKTOP').read()
-+ raw_workspace = self.exec_cmd('xprop -root _NET_CURRENT_DESKTOP')
++ raw_workspace = self.exec_cmd_under_X('xprop -root _NET_CURRENT_DESKTOP')
workspace = int(raw_workspace[33] + raw_workspace[34])
return workspace
wallpapoz-0.4.1-rev92-kill-multiple-daemon.patch:
share/wallpapoz/lib/wallpapoz_system.py | 14 ++++++++++++++
src/daemon_wallpapoz | 4 ++++
2 files changed, 18 insertions(+)
Index: wallpapoz-0.4.1-rev92-kill-multiple-daemon.patch
===================================================================
RCS file: /cvs/extras/rpms/wallpapoz/devel/wallpapoz-0.4.1-rev92-kill-multiple-daemon.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- wallpapoz-0.4.1-rev92-kill-multiple-daemon.patch 8 Feb 2010 18:32:04 -0000 1.1
+++ wallpapoz-0.4.1-rev92-kill-multiple-daemon.patch 11 Jun 2010 19:44:36 -0000 1.2
@@ -1,10 +1,9 @@
---- wallpapoz-0.4.1-svn92_trunk/share/wallpapoz/lib/wallpapoz_system.py.kill_multi 2010-02-09 03:12:50.000000000 +0900
-+++ wallpapoz-0.4.1-svn92_trunk/share/wallpapoz/lib/wallpapoz_system.py 2010-02-09 03:13:01.000000000 +0900
-@@ -150,3 +150,18 @@
+--- wallpapoz-0.4.1-svn92_trunk/share/wallpapoz/lib/wallpapoz_system.py.kill_multi 2010-03-18 01:01:50.000000000 +0900
++++ wallpapoz-0.4.1-svn92_trunk/share/wallpapoz/lib/wallpapoz_system.py 2010-03-18 01:03:38.000000000 +0900
+@@ -189,3 +189,17 @@
print "os.execvp failed, exiting..."
sys.exit(1)
- return
-+
+
+ def prevent_multiple_start(self):
+ cpid = os.getpid()
+ cid = os.getuid()
@@ -19,8 +18,8 @@
+ if ( id_list in python_id_list ) and ( int(id_list) != cpid) :
+ os.kill(int(id_list), signal.SIGTERM)
+
---- wallpapoz-0.4.1-svn92_trunk/src/daemon_wallpapoz.kill_multi 2010-02-09 03:12:50.000000000 +0900
-+++ wallpapoz-0.4.1-svn92_trunk/src/daemon_wallpapoz 2010-02-09 03:13:01.000000000 +0900
+--- wallpapoz-0.4.1-svn92_trunk/src/daemon_wallpapoz.kill_multi 2010-03-18 01:01:50.000000000 +0900
++++ wallpapoz-0.4.1-svn92_trunk/src/daemon_wallpapoz 2010-03-18 01:01:50.000000000 +0900
@@ -98,6 +98,10 @@
# create the system class ( to change wallpaper and read current desktop )
# by calling external program
Index: wallpapoz.spec
===================================================================
RCS file: /cvs/extras/rpms/wallpapoz/devel/wallpapoz.spec,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -p -r1.32 -r1.33
--- wallpapoz.spec 9 Feb 2010 16:45:52 -0000 1.32
+++ wallpapoz.spec 11 Jun 2010 19:44:37 -0000 1.33
@@ -8,7 +8,7 @@
%define mainver 0.4.1
%undefine betaver
%define svnver svn92_trunk
-%define fedorarel 16
+%define fedorarel 21
%define rel %{?betaver:0.}%{fedorarel}%{?svnver:.%svnver}%{?betaver:.%betaver}
@@ -25,7 +25,7 @@ Source0: %{srcurl}files/%{name}-%
Source11: wallpapoz-autostart.desktop
%endif
# Misc fixes for daemon_wallpapoz under compiz working,
-# containing fix for bug 531342, 542244
+# containing fix for bug 531342, 542244, bug 567437, bug 573642
Patch0: wallpapoz-0.4.1-rev92-compiz-respawn.patch
# Check if selected item is really a directory when adding directory
# bug 549219
@@ -35,10 +35,13 @@ Patch3: wallpapoz-0.4.1-rev92-no
# Intialization for pasting selected items
Patch4: wallpapoz-0.4.1-rev92-paste-initialization.patch
# Kill daemon_wallpapoz when X resource is no longer available
-# bug 531343, 538533, 541434, 556377
+# bug 531343, 538533, 541434, 556377, 569135, 571827
+# (and bug 566594)
Patch5: wallpapoz-0.4.1-rev92-kill-daemon-without-x.patch
# Kill other daemon_wallpapoz if running
Patch6: wallpapoz-0.4.1-rev92-kill-multiple-daemon.patch
+# bug 602921, handle animated image file
+Patch7: wallpapoz-0.4.1-rev92-animated-image.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -53,13 +56,11 @@ BuildRequires: gnome-python2
%if 0%{?fedora} >= 10
BuildRequires: gnome-python2-gnome
%endif
+# Because wallpapoz uses gconftool-2 or so
Requires: GConf2
Requires: pygtk2-libglade
Requires: python-imaging
-Requires: gnome-python2
-%if 0%{?fedora} >= 10
Requires: gnome-python2-gnome
-%endif
Requires: xorg-x11-utils
Requires: %{_bindir}/kill
Requires: %{_bindir}/pgrep
@@ -76,6 +77,7 @@ wallpapers for different workspaces or v
%patch4 -p1 -b .patch_init
%patch5 -p1 -b .kill_nox
%patch6 -p1 -b .kill_multi
+%patch7 -p1 -b .anime
%build
@@ -122,6 +124,24 @@ desktop-file-install \
%{_datadir}/applications/fedora-%{name}.desktop
%changelog
+* Sat Jun 12 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.4.1-21.svn92_trunk
+- Handle animated image file (bug 602921)
+
+* Thu Mar 18 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.4.1-20.svn92_trunk
+- Handle another potentially race condition under compiz (may fix 573642)
+
+* Wed Mar 10 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.4.1-19.svn92_trunk
+- Kill daemon_wallpapoz in more cases (may fix bug 571827)
+
+* Mon Mar 1 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.4.1-18.svn92_trunk
+- -compiz-respawn.patch: simplify
+- Handle more cases where X is no longer available (bug 569135)
+- Handle fork() failure (bug 566594)
+
+* Fri Feb 26 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.4.1-17.svn92_trunk
+- Another try for race condition on checking compiz status
+ (bug 567437)
+
* Wed Feb 10 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.4.1-16.svn92_trunk
- Don't update compiz status to fix race (bug 562943)
More information about the scm-commits
mailing list