From 953813536d447bb45b316aee2d168858d5e97379 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 17 Feb 2010 03:26:15 +0000 Subject: [PATCH 01/12] Initialize branch F-13 for wallpapoz --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..baa94ef --- /dev/null +++ b/branch @@ -0,0 +1 @@ +F-13 From 3c26273600b1e6bbef3bd3035256559be9671eec Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Thu, 25 Feb 2010 19:57:10 +0000 Subject: [PATCH 02/12] - Another try for race condition on checking compiz status (bug 567437) --- wallpapoz-0.4.1-rev92-compiz-respawn.patch | 31 ++++++++++++++++++---- wallpapoz.spec | 6 ++++- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/wallpapoz-0.4.1-rev92-compiz-respawn.patch b/wallpapoz-0.4.1-rev92-compiz-respawn.patch index dd35568..470cca1 100644 --- a/wallpapoz-0.4.1-rev92-compiz-respawn.patch +++ b/wallpapoz-0.4.1-rev92-compiz-respawn.patch @@ -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-02-26 04:44:33.000000000 +0900 +@@ -25,14 +25,28 @@ # achieve goal by calling external program import os @@ -8,7 +8,28 @@ import string class WallpapozSystem: -@@ -73,6 +74,11 @@ + ++ # Define static variable to save the initial value of self.beryl ++ static_check_beryl_called_p = False ++ static_beryl = False ++ + 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 != WallpapozSystem.static_beryl : ++ self.respawn_system() ++ + if self.beryl: + self.finding_row_and_column() + self.finding_total_workspaces() +@@ -73,6 +87,11 @@ if self.geometry_height!=self.screen_height: self.beryl = True @@ -20,7 +41,7 @@ ## 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 +132,11 @@ return True else: return False @@ -33,7 +54,7 @@ + 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 ++++ wallpapoz-0.4.1-svn92_trunk/src/daemon_wallpapoz 2010-02-26 04:44:12.000000000 +0900 @@ -107,6 +107,9 @@ delay = 60 * float(wallpapozxml.delay()) randomvar = int(wallpapozxml.is_random()) diff --git a/wallpapoz.spec b/wallpapoz.spec index 1e57b2d..3a104a2 100644 --- a/wallpapoz.spec +++ b/wallpapoz.spec @@ -8,7 +8,7 @@ %define mainver 0.4.1 %undefine betaver %define svnver svn92_trunk -%define fedorarel 16 +%define fedorarel 17 %define rel %{?betaver:0.}%{fedorarel}%{?svnver:.%svnver}%{?betaver:.%betaver} @@ -122,6 +122,10 @@ desktop-file-install \ %{_datadir}/applications/fedora-%{name}.desktop %changelog +* Fri Feb 26 2010 Mamoru Tasaka - 0.4.1-17.svn92_trunk +- Another try for race condition on checking compiz status + (bug 567437) + * Wed Feb 10 2010 Mamoru Tasaka - 0.4.1-16.svn92_trunk - Don't update compiz status to fix race (bug 562943) From 7538ede0e965d960cce65dba81c27af54dd63261 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Sun, 28 Feb 2010 17:59:31 +0000 Subject: [PATCH 03/12] - -compiz-respawn.patch: simplify - Handle more cases where X is no longer available (bug 569135) - Handle fork() failure (bug 566594) --- wallpapoz-0.4.1-rev92-compiz-respawn.patch | 53 +++++++---------- ...oz-0.4.1-rev92-kill-daemon-without-x.patch | 59 +++++++++++-------- wallpapoz.spec | 12 +++- 3 files changed, 66 insertions(+), 58 deletions(-) diff --git a/wallpapoz-0.4.1-rev92-compiz-respawn.patch b/wallpapoz-0.4.1-rev92-compiz-respawn.patch index 470cca1..3e5eab9 100644 --- a/wallpapoz-0.4.1-rev92-compiz-respawn.patch +++ b/wallpapoz-0.4.1-rev92-compiz-respawn.patch @@ -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-26 04:44:33.000000000 +0900 -@@ -25,14 +25,28 @@ ++++ wallpapoz-0.4.1-svn92_trunk/share/wallpapoz/lib/wallpapoz_system.py 2010-03-01 02:28:48.000000000 +0900 +@@ -25,14 +25,26 @@ # achieve goal by calling external program import os @@ -23,25 +23,29 @@ + if not WallpapozSystem.static_check_beryl_called_p : + WallpapozSystem.static_check_beryl_called_p = True + WallpapozSystem.static_beryl = self.beryl -+ if self.beryl != WallpapozSystem.static_beryl : -+ self.respawn_system() + if self.beryl: self.finding_row_and_column() self.finding_total_workspaces() -@@ -73,6 +87,11 @@ - if self.geometry_height!=self.screen_height: +@@ -69,10 +81,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 +132,11 @@ +@@ -113,3 +130,11 @@ return True else: return False @@ -54,33 +58,18 @@ + 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-26 04:44:12.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-01 02:30:43.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() diff --git a/wallpapoz-0.4.1-rev92-kill-daemon-without-x.patch b/wallpapoz-0.4.1-rev92-kill-daemon-without-x.patch index 0b123a8..063f548 100644 --- a/wallpapoz-0.4.1-rev92-kill-daemon-without-x.patch +++ b/wallpapoz-0.4.1-rev92-kill-daemon-without-x.patch @@ -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-01 02:24:19.000000000 +0900 ++++ wallpapoz-0.4.1-svn92_trunk/share/wallpapoz/lib/wallpapoz_system.py 2010-03-01 02:25:20.000000000 +0900 @@ -24,9 +24,11 @@ ## wallpapoz_system.py -- finds current desktop and changes wallpaper # achieve goal by calling external program @@ -12,29 +12,42 @@ class WallpapozSystem: -@@ -38,12 +40,34 @@ +@@ -49,12 +51,47 @@ 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 -+ ) ++ def exec_cmd_under_X(self, cmd): ++ try: ++ p = subprocess.Popen( ++ cmd, ++ stdout = subprocess.PIPE, ++ stderr = subprocess.PIPE, ++ shell = True ++ ) ++ except OSError: ++ print "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): ++ if pstderr.find('unable to open display') >= 0: ++ kill_daemon = True ++ if ((cmd.find('xwininfo') >= 0) and ++ (pstderr.find("Can't get window attributes") >= 0)): ++ 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 "X resource seems no longer available, killing daemon_wallpapoz." ++ sys.exit(1) + + return pstdout + @@ -44,39 +57,39 @@ ## 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 @@ +@@ -67,11 +104,11 @@ 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]) ## 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 @@ +@@ -102,7 +139,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 @@ +@@ -111,7 +148,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 diff --git a/wallpapoz.spec b/wallpapoz.spec index 3a104a2..be096bd 100644 --- a/wallpapoz.spec +++ b/wallpapoz.spec @@ -8,7 +8,7 @@ %define mainver 0.4.1 %undefine betaver %define svnver svn92_trunk -%define fedorarel 17 +%define fedorarel 18 %define rel %{?betaver:0.}%{fedorarel}%{?svnver:.%svnver}%{?betaver:.%betaver} @@ -25,7 +25,7 @@ Source0: %{srcurl}files/%{name}-%{mainver}%{?svnver:-%svnver}%{?betaver:% 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 Patch0: wallpapoz-0.4.1-rev92-compiz-respawn.patch # Check if selected item is really a directory when adding directory # bug 549219 @@ -35,7 +35,8 @@ Patch3: wallpapoz-0.4.1-rev92-noitem_selected.patch # 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 +# (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 @@ -122,6 +123,11 @@ desktop-file-install \ %{_datadir}/applications/fedora-%{name}.desktop %changelog +* Mon Mar 1 2010 Mamoru Tasaka - 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 - 0.4.1-17.svn92_trunk - Another try for race condition on checking compiz status (bug 567437) From bd6e0fec7a31d313c03bef9479886ffe33f61a21 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Tue, 9 Mar 2010 19:03:26 +0000 Subject: [PATCH 04/12] - Kill daemon_wallpapoz in more cases (may fix bug 571827) --- ...oz-0.4.1-rev92-kill-daemon-without-x.patch | 23 +++++++++---------- wallpapoz.spec | 5 +++- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/wallpapoz-0.4.1-rev92-kill-daemon-without-x.patch b/wallpapoz-0.4.1-rev92-kill-daemon-without-x.patch index 063f548..80df4b4 100644 --- a/wallpapoz-0.4.1-rev92-kill-daemon-without-x.patch +++ b/wallpapoz-0.4.1-rev92-kill-daemon-without-x.patch @@ -1,5 +1,5 @@ ---- wallpapoz-0.4.1-svn92_trunk/share/wallpapoz/lib/wallpapoz_system.py.kill_nox 2010-03-01 02:24:19.000000000 +0900 -+++ wallpapoz-0.4.1-svn92_trunk/share/wallpapoz/lib/wallpapoz_system.py 2010-03-01 02:25:20.000000000 +0900 +--- wallpapoz-0.4.1-svn92_trunk/share/wallpapoz/lib/wallpapoz_system.py.kill_nox 2010-03-10 03:29:22.000000000 +0900 ++++ wallpapoz-0.4.1-svn92_trunk/share/wallpapoz/lib/wallpapoz_system.py 2010-03-10 03:30:08.000000000 +0900 @@ -24,9 +24,11 @@ ## wallpapoz_system.py -- finds current desktop and changes wallpaper # achieve goal by calling external program @@ -12,7 +12,7 @@ class WallpapozSystem: -@@ -49,12 +51,47 @@ +@@ -49,12 +51,46 @@ self.finding_row_and_column() self.finding_total_workspaces() @@ -25,7 +25,7 @@ + shell = True + ) + except OSError: -+ print "Fork failed for %s, exiting." %cmd ++ print "daemon_wallpapoz: fork failed for %s, exiting." %cmd + sys.exit(1) + + pstdout = p.stdout.read() @@ -35,10 +35,8 @@ + kill_daemon = False + + if (ret != 0) and (ret & 0xFF): -+ if pstderr.find('unable to open display') >= 0: -+ kill_daemon = True -+ if ((cmd.find('xwininfo') >= 0) and -+ (pstderr.find("Can't get window attributes") >= 0)): ++ 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): @@ -46,7 +44,8 @@ + + if kill_daemon: + ## No X resource available, kill daemon_wallpapoz -+ print "X resource seems no longer available, killing daemon_wallpapoz." ++ print "daemon_wallpapoz: X resource seems no longer available." ++ print "daemon_wallpapoz: killing daemon_wallpapoz." + sys.exit(1) + + return pstdout @@ -61,7 +60,7 @@ start_width = raw_resolution.find('Width') end_width = raw_resolution.find('\n',start_width) start_height = raw_resolution.find('Height') -@@ -67,11 +104,11 @@ +@@ -67,11 +103,11 @@ if self.beryl: self.total_workspaces = self.row_workspaces * self.column_workspaces else: @@ -75,7 +74,7 @@ # 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')] -@@ -102,7 +139,7 @@ +@@ -102,7 +138,7 @@ ## class method to know what workspace we are in now def current_desktop(self): if self.beryl: @@ -84,7 +83,7 @@ # 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')] -@@ -111,7 +148,7 @@ +@@ -111,7 +147,7 @@ y_pos = int(viewport[1]) / self.screen_height workspace = x_pos + self.column_workspaces * y_pos else: diff --git a/wallpapoz.spec b/wallpapoz.spec index be096bd..f6ce9b2 100644 --- a/wallpapoz.spec +++ b/wallpapoz.spec @@ -8,7 +8,7 @@ %define mainver 0.4.1 %undefine betaver %define svnver svn92_trunk -%define fedorarel 18 +%define fedorarel 19 %define rel %{?betaver:0.}%{fedorarel}%{?svnver:.%svnver}%{?betaver:.%betaver} @@ -123,6 +123,9 @@ desktop-file-install \ %{_datadir}/applications/fedora-%{name}.desktop %changelog +* Wed Mar 10 2010 Mamoru Tasaka - 0.4.1-19.svn92_trunk +- Kill daemon_wallpapoz in more cases (may fix bug 571827) + * Mon Mar 1 2010 Mamoru Tasaka - 0.4.1-18.svn92_trunk - -compiz-respawn.patch: simplify - Handle more cases where X is no longer available (bug 569135) From 1207375c541514b464c715b43cceec7b7c3753be Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Wed, 17 Mar 2010 16:39:55 +0000 Subject: [PATCH 05/12] - Handle another potentially race condition under compiz (may fix 573642) --- wallpapoz-0.4.1-rev92-compiz-respawn.patch | 38 ++++++++++++++++--- ...oz-0.4.1-rev92-kill-daemon-without-x.patch | 20 ++++++---- ...poz-0.4.1-rev92-kill-multiple-daemon.patch | 13 +++---- wallpapoz.spec | 9 +++-- 4 files changed, 56 insertions(+), 24 deletions(-) diff --git a/wallpapoz-0.4.1-rev92-compiz-respawn.patch b/wallpapoz-0.4.1-rev92-compiz-respawn.patch index 3e5eab9..bd773d3 100644 --- a/wallpapoz-0.4.1-rev92-compiz-respawn.patch +++ b/wallpapoz-0.4.1-rev92-compiz-respawn.patch @@ -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-03-01 02:28:48.000000000 +0900 -@@ -25,14 +25,26 @@ ++++ 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 @@ -12,6 +12,10 @@ + # 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' @@ -27,7 +31,29 @@ if self.beryl: self.finding_row_and_column() self.finding_total_workspaces() -@@ -69,10 +81,15 @@ + ++ # 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 @@ -45,7 +71,7 @@ ## 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 +130,11 @@ +@@ -113,3 +145,11 @@ return True else: return False @@ -56,9 +82,9 @@ + 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-03-01 02:30:43.000000000 +0900 ++++ 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: diff --git a/wallpapoz-0.4.1-rev92-kill-daemon-without-x.patch b/wallpapoz-0.4.1-rev92-kill-daemon-without-x.patch index 80df4b4..f394d8f 100644 --- a/wallpapoz-0.4.1-rev92-kill-daemon-without-x.patch +++ b/wallpapoz-0.4.1-rev92-kill-daemon-without-x.patch @@ -1,5 +1,5 @@ ---- wallpapoz-0.4.1-svn92_trunk/share/wallpapoz/lib/wallpapoz_system.py.kill_nox 2010-03-10 03:29:22.000000000 +0900 -+++ wallpapoz-0.4.1-svn92_trunk/share/wallpapoz/lib/wallpapoz_system.py 2010-03-10 03:30:08.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,9 +12,9 @@ class WallpapozSystem: -@@ -49,12 +51,46 @@ - self.finding_row_and_column() - self.finding_total_workspaces() +@@ -59,12 +61,46 @@ + print "daemon_wallpapoz: respawning daemon_wallpapoz." + self.respawn_system() + def exec_cmd_under_X(self, cmd): + try: @@ -60,13 +60,17 @@ start_width = raw_resolution.find('Width') end_width = raw_resolution.find('\n',start_width) start_height = raw_resolution.find('Height') -@@ -67,11 +103,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_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() @@ -74,7 +78,7 @@ # 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')] -@@ -102,7 +138,7 @@ +@@ -117,7 +153,7 @@ ## class method to know what workspace we are in now def current_desktop(self): if self.beryl: @@ -83,7 +87,7 @@ # 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')] -@@ -111,7 +147,7 @@ +@@ -126,7 +162,7 @@ y_pos = int(viewport[1]) / self.screen_height workspace = x_pos + self.column_workspaces * y_pos else: diff --git a/wallpapoz-0.4.1-rev92-kill-multiple-daemon.patch b/wallpapoz-0.4.1-rev92-kill-multiple-daemon.patch index 50d29dd..eaa4f7e 100644 --- a/wallpapoz-0.4.1-rev92-kill-multiple-daemon.patch +++ b/wallpapoz-0.4.1-rev92-kill-multiple-daemon.patch @@ -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 diff --git a/wallpapoz.spec b/wallpapoz.spec index f6ce9b2..ca3db91 100644 --- a/wallpapoz.spec +++ b/wallpapoz.spec @@ -8,7 +8,7 @@ %define mainver 0.4.1 %undefine betaver %define svnver svn92_trunk -%define fedorarel 19 +%define fedorarel 20 %define rel %{?betaver:0.}%{fedorarel}%{?svnver:.%svnver}%{?betaver:.%betaver} @@ -25,7 +25,7 @@ Source0: %{srcurl}files/%{name}-%{mainver}%{?svnver:-%svnver}%{?betaver:% Source11: wallpapoz-autostart.desktop %endif # Misc fixes for daemon_wallpapoz under compiz working, -# containing fix for bug 531342, 542244, bug 567437 +# 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,7 +35,7 @@ Patch3: wallpapoz-0.4.1-rev92-noitem_selected.patch # 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, 569135 +# 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 @@ -123,6 +123,9 @@ desktop-file-install \ %{_datadir}/applications/fedora-%{name}.desktop %changelog +* Thu Mar 18 2010 Mamoru Tasaka - 0.4.1-20.svn92_trunk +- Handle another potentially race condition under compiz (may fix 573642) + * Wed Mar 10 2010 Mamoru Tasaka - 0.4.1-19.svn92_trunk - Kill daemon_wallpapoz in more cases (may fix bug 571827) From 9fbd8c0a5b305bbc82279476041f231c0d48712f Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Fri, 11 Jun 2010 19:44:36 +0000 Subject: [PATCH 06/12] - Handle animated image file (bug 602921) --- wallpapoz-0.4.1-rev92-animated-image.patch | 40 ++++++++++++++++++++++ wallpapoz.spec | 12 ++++--- 2 files changed, 48 insertions(+), 4 deletions(-) create mode 100644 wallpapoz-0.4.1-rev92-animated-image.patch diff --git a/wallpapoz-0.4.1-rev92-animated-image.patch b/wallpapoz-0.4.1-rev92-animated-image.patch new file mode 100644 index 0000000..3fc30d0 --- /dev/null +++ b/wallpapoz-0.4.1-rev92-animated-image.patch @@ -0,0 +1,40 @@ +--- 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("" + os.path.basename(filename) + "") diff --git a/wallpapoz.spec b/wallpapoz.spec index ca3db91..dc9ff2f 100644 --- a/wallpapoz.spec +++ b/wallpapoz.spec @@ -8,7 +8,7 @@ %define mainver 0.4.1 %undefine betaver %define svnver svn92_trunk -%define fedorarel 20 +%define fedorarel 21 %define rel %{?betaver:0.}%{fedorarel}%{?svnver:.%svnver}%{?betaver:.%betaver} @@ -40,6 +40,8 @@ Patch4: wallpapoz-0.4.1-rev92-paste-initialization.patch 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 @@ -54,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 @@ -77,6 +77,7 @@ wallpapers for different workspaces or virtual desktops. %patch4 -p1 -b .patch_init %patch5 -p1 -b .kill_nox %patch6 -p1 -b .kill_multi +%patch7 -p1 -b .anime %build @@ -123,6 +124,9 @@ desktop-file-install \ %{_datadir}/applications/fedora-%{name}.desktop %changelog +* Sat Jun 12 2010 Mamoru Tasaka - 0.4.1-21.svn92_trunk +- Handle animated image file (bug 602921) + * Thu Mar 18 2010 Mamoru Tasaka - 0.4.1-20.svn92_trunk - Handle another potentially race condition under compiz (may fix 573642) From 2b251f648674d6d62ce089227cb13f43c6772c64 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Sat, 12 Jun 2010 17:17:47 +0000 Subject: [PATCH 07/12] - Make wallpapoz gui ignore non-utf8 directory correctly (filechooser_widget.get_filename can return NoneType, bug 603351) --- wallpapoz-0.4.1-rev92-nonutf8-directory.patch | 22 +++++++++++++++++++ wallpapoz.spec | 15 ++++++++++--- 2 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 wallpapoz-0.4.1-rev92-nonutf8-directory.patch diff --git a/wallpapoz-0.4.1-rev92-nonutf8-directory.patch b/wallpapoz-0.4.1-rev92-nonutf8-directory.patch new file mode 100644 index 0000000..6c4157c --- /dev/null +++ b/wallpapoz-0.4.1-rev92-nonutf8-directory.patch @@ -0,0 +1,22 @@ +--- wallpapoz-0.4.1-svn92_trunk/src/wallpapoz.nonutf8 2010-06-13 01:21:08.000000000 +0900 ++++ wallpapoz-0.4.1-svn92_trunk/src/wallpapoz 2010-06-13 01:39:08.000000000 +0900 +@@ -543,6 +543,9 @@ + num_of_child = self.store.iter_n_children(iter) + # what is the directory? + cur_dir = filechooser_widget.get_filename() ++ # get_filename can return NoneType (for non-UTF8 directory) ++ if not cur_dir: ++ return + # if recursive, we use walktree + if recursive_widget.get_active(): + # looping with walktree method +@@ -587,6 +590,9 @@ + new_index = self.store.get_value(next_iter, 0) + 1 + # what is the directory? + cur_dir = filechooser_widget.get_filename() ++ # get_filename can return NoneType (for non-UTF8 directory) ++ if not cur_dir: ++ return + # if recursive, we use walktree + if recursive_widget.get_active(): + # looping with walktree method diff --git a/wallpapoz.spec b/wallpapoz.spec index dc9ff2f..a309e6f 100644 --- a/wallpapoz.spec +++ b/wallpapoz.spec @@ -8,7 +8,7 @@ %define mainver 0.4.1 %undefine betaver %define svnver svn92_trunk -%define fedorarel 21 +%define fedorarel 22 %define rel %{?betaver:0.}%{fedorarel}%{?svnver:.%svnver}%{?betaver:.%betaver} @@ -40,8 +40,12 @@ Patch4: wallpapoz-0.4.1-rev92-paste-initialization.patch 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 +# Make wallpapoz gui handle animated image file +# bug 602921 Patch7: wallpapoz-0.4.1-rev92-animated-image.patch +# Non-utf8 directory can return NoneType with filechooser_widget.get_filename +# bug 603351 +Patch8: wallpapoz-0.4.1-rev92-nonutf8-directory.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -78,6 +82,7 @@ wallpapers for different workspaces or virtual desktops. %patch5 -p1 -b .kill_nox %patch6 -p1 -b .kill_multi %patch7 -p1 -b .anime +%patch8 -p1 -b .nonutf8 %build @@ -124,8 +129,12 @@ desktop-file-install \ %{_datadir}/applications/fedora-%{name}.desktop %changelog +* Sun Jun 13 2010 Mamoru Tasaka - 0.4.1-22.svn92_trunk +- Make wallpapoz gui ignore non-utf8 directory correctly + (filechooser_widget.get_filename can return NoneType, bug 603351) + * Sat Jun 12 2010 Mamoru Tasaka - 0.4.1-21.svn92_trunk -- Handle animated image file (bug 602921) +- Make wallpapoz gui handle animated image file (bug 602921) * Thu Mar 18 2010 Mamoru Tasaka - 0.4.1-20.svn92_trunk - Handle another potentially race condition under compiz (may fix 573642) From 85a5191494bef2f43adf6a42f848f5fe918f1777 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Sun, 13 Jun 2010 08:50:57 +0000 Subject: [PATCH 08/12] - Don't remove a wallpaper from workspace when only one wallpaper is left (bug 567136) - Also some fixes for gtk menu sensitive issue (after some movement for wallpapers) --- ...poz-0.4.1-rev92-delete-one-wallpaper.patch | 107 ++++++++++++++++++ wallpapoz.spec | 16 ++- 2 files changed, 121 insertions(+), 2 deletions(-) create mode 100644 wallpapoz-0.4.1-rev92-delete-one-wallpaper.patch diff --git a/wallpapoz-0.4.1-rev92-delete-one-wallpaper.patch b/wallpapoz-0.4.1-rev92-delete-one-wallpaper.patch new file mode 100644 index 0000000..88fb809 --- /dev/null +++ b/wallpapoz-0.4.1-rev92-delete-one-wallpaper.patch @@ -0,0 +1,107 @@ +--- wallpapoz-0.4.1-svn92_trunk/src/wallpapoz.deleteone 2010-06-13 03:08:43.000000000 +0900 ++++ wallpapoz-0.4.1-svn92_trunk/src/wallpapoz 2010-06-13 17:33:06.000000000 +0900 +@@ -833,6 +833,16 @@ + # list to put our lowest iter in every related workspace + lowest_iter_list = [] + ++ # FIXME ++ # FIXME ++ # Currently copy_iter_list can be NoneType, e.g. when ++ # - Select one wallpaper in a workspace ++ # - and delete it ++ # - next choose "Edit -> "Delete Wallpaperz"" ++ # Well, bugish, however anyway workaround... ++ if not copy_iter_list: ++ return lowest_iter_list ++ + # indication we have done with this workspace + done_workspace = True + +@@ -899,8 +909,16 @@ + # do the remaining job, get the lowest iter from last workspace if we have not done withlast workspace + if not done_workspace: + +- lowest_iter_list.append( +- self.store.get_iter( (parent_number_index, iter_workspace_index+1) ) ) ++ # Umm... the original code raises ValueError if trying to delete ++ # a wallpaper from a workspace, if only one wallpaper existed. ++ # Need further investigation, however anyway workaround... ++ new_iter = [] ++ try: ++ new_iter = self.store.get_iter((parent_number_index, iter_workspace_index + 1)) ++ except ValueError: ++ pass ++ if new_iter: ++ lowest_iter_list.append(new_iter) + + return lowest_iter_list + +@@ -983,6 +1001,11 @@ + def cut_and_reordering_treeiter(self): + lowest_iter_list = self.reordering_node_after_cut_and_paste( self.selected_iter ) + ++ # workaround for the case that trying to remove a wallpaper from ++ # the workspace where only one wallpaper exists ++ if not lowest_iter_list: ++ return ++ + # iterate to cut ( really!!! ) the iter from selected iter list + for single_iter in self.selected_iter: + +@@ -993,6 +1016,9 @@ + for single_iter in lowest_iter_list: + self.order_treeiter_from_lowest_iter(single_iter) + ++ # Finally update selection view ++ self.treeview_selection_changed(None) ++ + # order treeiter in one workspace or in list mode from lowest iter ( more efficient ) + def order_treeiter_from_lowest_iter(self, single_iter): + # get the path +@@ -1209,6 +1235,22 @@ + # it display another image, and disable/enable some menu + def treeview_selection_changed(self, widget): + position_iter = self.get_selected_iter_of_treeview("anything") ++ ++ if not position_iter: ++ # Nothing is selected, unfortunately this can happen ++ self.main_window.get_widget("rename_workspace").set_sensitive(False) ++ self.rename_workspace_menu.set_sensitive(False) ++ self.main_window.get_widget("change_wallpaper").set_sensitive(False) ++ self.change_wallpaper_menu.set_sensitive(False) ++ self.main_window.get_widget("cut").set_sensitive(False) ++ self.cut_menu.set_sensitive(False) ++ self.main_window.get_widget("copy").set_sensitive(False) ++ self.copy_menu.set_sensitive(False) ++ self.main_window.get_widget("delete_wallpapers").set_sensitive(False) ++ self.delete_wallpapers_menu.set_sensitive(False) ++ # Nothing left ++ return ++ + if type(self.store) == gtk.TreeStore: + parent = self.store.iter_parent(position_iter) + # parent node, enable: rename_workspace +@@ -1224,8 +1266,21 @@ + self.cut_menu.set_sensitive(True) + self.main_window.get_widget("copy").set_sensitive(True) + self.copy_menu.set_sensitive(True) +- self.main_window.get_widget("delete_wallpapers").set_sensitive(True) +- self.delete_wallpapers_menu.set_sensitive(True) ++ ++ # See create_configuration_file ++ # Check if there are at least 2 wallpapers ++ childiter = self.store.iter_children(parent) ++ childiter = self.store.iter_next(childiter) ++ ++ # Only show "Delete wallpapers" menu if there are at least 2 wallpapers ++ # in a workspace ++ if childiter: ++ self.main_window.get_widget("delete_wallpapers").set_sensitive(True) ++ self.delete_wallpapers_menu.set_sensitive(True) ++ else: ++ self.main_window.get_widget("delete_wallpapers").set_sensitive(False) ++ self.delete_wallpapers_menu.set_sensitive(False) ++ + # parent node + else: + self.main_window.get_widget("rename_workspace").set_sensitive(True) diff --git a/wallpapoz.spec b/wallpapoz.spec index a309e6f..da6d8d0 100644 --- a/wallpapoz.spec +++ b/wallpapoz.spec @@ -8,7 +8,7 @@ %define mainver 0.4.1 %undefine betaver %define svnver svn92_trunk -%define fedorarel 22 +%define fedorarel 23 %define rel %{?betaver:0.}%{fedorarel}%{?svnver:.%svnver}%{?betaver:.%betaver} @@ -46,7 +46,12 @@ Patch7: wallpapoz-0.4.1-rev92-animated-image.patch # Non-utf8 directory can return NoneType with filechooser_widget.get_filename # bug 603351 Patch8: wallpapoz-0.4.1-rev92-nonutf8-directory.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +# Don't remove a wallpaper from a workspace if there is only one +# wallpaper left. +# bug 567136 +# Also some fixes about gtk menu sensitive issue (after doing some movement +# for wallpapers) +Patch9: wallpapoz-0.4.1-rev92-delete-one-wallpaper.patch BuildArch: noarch @@ -83,6 +88,7 @@ wallpapers for different workspaces or virtual desktops. %patch6 -p1 -b .kill_multi %patch7 -p1 -b .anime %patch8 -p1 -b .nonutf8 +%patch9 -p1 -b .deleteone %build @@ -129,6 +135,12 @@ desktop-file-install \ %{_datadir}/applications/fedora-%{name}.desktop %changelog +* Sun Jun 13 2010 Mamoru Tasaka - 0.4.1-23.svn92_trunk +- Don't remove a wallpaper from workspace when only one wallpaper is left + (bug 567136) +- Also some fixes for gtk menu sensitive issue (after some movement for + wallpapers) + * Sun Jun 13 2010 Mamoru Tasaka - 0.4.1-22.svn92_trunk - Make wallpapoz gui ignore non-utf8 directory correctly (filechooser_widget.get_filename can return NoneType, bug 603351) From 76855515a077a033696e1a7084667030e6b57aff Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Mon, 14 Jun 2010 18:42:39 +0000 Subject: [PATCH 09/12] - Fix backtrace when deleting first element in desktop (not workspace) mode (bug 597959) - Install daemon_wallpapoz wrapper script to check if xprop really works before launching daemon (may fix 584980, 597687??) --- daemon_wallpapoz-wrapper | 29 +++++++++++++++++++ ...1-rev92-delete-first-in-desktop-mode.patch | 18 ++++++++++++ wallpapoz.spec | 27 +++++++++++++++-- 3 files changed, 71 insertions(+), 3 deletions(-) create mode 100644 daemon_wallpapoz-wrapper create mode 100644 wallpapoz-0.4.1-rev92-delete-first-in-desktop-mode.patch diff --git a/daemon_wallpapoz-wrapper b/daemon_wallpapoz-wrapper new file mode 100644 index 0000000..89ea42d --- /dev/null +++ b/daemon_wallpapoz-wrapper @@ -0,0 +1,29 @@ +#!/bin/sh + +which xprop &>/dev/null || exit 1 +sleep 2 + +TRIAL=0 +PROGNAME=$0 +while true ; do + RESULT=$(xprop -root _NET_DESKTOP_GEOMETRY 2>/dev/null) + RESULT=${RESULT:34} + WIDTH=$(echo $RESULT | sed -e 's|,.*$||') + HEIGHT=$(echo $RESULT | sed -e 's|^.*,||' | sed -e 's|^[ \t][ \t]*||') + if [[ ( -z $WIDTH ) || ( -z $WIDTH ) ]] ; then + # xprop failed + TRIAL=$((TRIAL+1)) + echo "$PROGNAME: xprop returned unexpected result for $TRIAL times" + if test $TRIAL -ge 4 ; then + echo "$PROGNAME: not lauching daemon_wallpapoz" + exit 1 + fi + sleep 3 + else + # xprop succeeded + break + fi +done + +exec /usr/libexec/daemon_wallpapoz "$@" +exit 1 diff --git a/wallpapoz-0.4.1-rev92-delete-first-in-desktop-mode.patch b/wallpapoz-0.4.1-rev92-delete-first-in-desktop-mode.patch new file mode 100644 index 0000000..ac27fc6 --- /dev/null +++ b/wallpapoz-0.4.1-rev92-delete-first-in-desktop-mode.patch @@ -0,0 +1,18 @@ +--- wallpapoz-0.4.1-svn92_trunk/src/wallpapoz.deletefirst 2010-06-15 01:45:58.000000000 +0900 ++++ wallpapoz-0.4.1-svn92_trunk/src/wallpapoz 2010-06-15 02:09:59.000000000 +0900 +@@ -1070,13 +1070,13 @@ + lowest_iter = self.store.get_iter((path_iter-1,)) + else: + index_temp = 0 ++ before_path_iter = 0 + for single_iter in self.selected_iter[1:]: + path_iter = self.store.get_path(single_iter)[0] + if path_iter == (index_temp + 1): + index_temp = index_temp + 1 + before_path_iter = path_iter +- else: +- lowest_iter = self.store.get_iter((before_path_iter+1,)) ++ lowest_iter = self.store.get_iter((before_path_iter+1,)) + + # remove the iter + for single_iter in self.selected_iter: diff --git a/wallpapoz.spec b/wallpapoz.spec index da6d8d0..f1582bb 100644 --- a/wallpapoz.spec +++ b/wallpapoz.spec @@ -8,7 +8,7 @@ %define mainver 0.4.1 %undefine betaver %define svnver svn92_trunk -%define fedorarel 23 +%define fedorarel 24 %define rel %{?betaver:0.}%{fedorarel}%{?svnver:.%svnver}%{?betaver:.%betaver} @@ -24,6 +24,9 @@ Source0: %{srcurl}files/%{name}-%{mainver}%{?svnver:-%svnver}%{?betaver:% %if 0%{?fedora} >= 12 Source11: wallpapoz-autostart.desktop %endif +# Install daemon_wallpapoz wrapper script, which may +# fix 584980, 597687? +Source12: daemon_wallpapoz-wrapper # Misc fixes for daemon_wallpapoz under compiz working, # containing fix for bug 531342, 542244, bug 567437, bug 573642 Patch0: wallpapoz-0.4.1-rev92-compiz-respawn.patch @@ -52,6 +55,9 @@ Patch8: wallpapoz-0.4.1-rev92-nonutf8-directory.patch # Also some fixes about gtk menu sensitive issue (after doing some movement # for wallpapers) Patch9: wallpapoz-0.4.1-rev92-delete-one-wallpaper.patch +# Fix backtrace when deleting first element in desktop (not workspace) mode +# bug 597959 +Patch10: wallpapoz-0.4.1-rev92-delete-first-in-desktop-mode.patch BuildArch: noarch @@ -88,7 +94,8 @@ wallpapers for different workspaces or virtual desktops. %patch6 -p1 -b .kill_multi %patch7 -p1 -b .anime %patch8 -p1 -b .nonutf8 -%patch9 -p1 -b .deleteone +%patch9 -p1 -b .deletelastone +%patch10 -p1 -b .deletefirst %build @@ -108,12 +115,19 @@ desktop-file-install \ # Install desktop application autostart stuff %if 0%{?fedora} >= 12 -mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/xdg/autostart +%{__mkdir_p} ${RPM_BUILD_ROOT}%{_sysconfdir}/xdg/autostart desktop-file-install \ --dir ${RPM_BUILD_ROOT}%{_sysconfdir}/xdg/autostart \ %{SOURCE11} %endif +# Install daemon_wallpapoz wrapper script +pushd ${RPM_BUILD_ROOT} +%{__mkdir_p} ./%{_libexecdir} +%{__mv} ./%{_bindir}/daemon_wallpapoz ./%{_libexecdir} +%{__install} -cp -m 0755 %{SOURCE12} ./%{_bindir}/daemon_wallpapoz +popd + %{find_lang} %{name} %clean @@ -123,6 +137,7 @@ desktop-file-install \ %defattr(-,root,root,-) %doc COPYING README %{_bindir}/*%{name} +%{_libexecdir}/daemon_wallpapoz %if 0%{?fedora} >= 12 %{_sysconfdir}/xdg/autostart/wallpapoz-autostart.desktop @@ -135,6 +150,12 @@ desktop-file-install \ %{_datadir}/applications/fedora-%{name}.desktop %changelog +* Tue Jun 15 2010 Mamoru Tasaka - 0.4.1-24.svn92_trunk +- Fix backtrace when deleting first element in desktop (not workspace) mode + (bug 597959) +- Install daemon_wallpapoz wrapper script to check if xprop really works before + launching daemon (may fix 584980, 597687??) + * Sun Jun 13 2010 Mamoru Tasaka - 0.4.1-23.svn92_trunk - Don't remove a wallpaper from workspace when only one wallpaper is left (bug 567136) From 4ed3e9e03f80a37ca563ab2b23095b0486fafb5a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 15:12:00 +0000 Subject: [PATCH 10/12] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- branch | 1 - 3 files changed, 22 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index e9aa5f3..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: wallpapoz -# $Id: Makefile,v 1.1 2006/10/17 17:17:06 mtasaka Exp $ -NAME := wallpapoz -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/branch b/branch deleted file mode 100644 index baa94ef..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -F-13 From d1a9d47ac9891c51190dff872d4c22696ff00497 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Thu, 7 Oct 2010 05:52:42 +0900 Subject: [PATCH 11/12] - Update to 0.5 --- .gitignore | 1 + sources | 2 +- wallpapoz.spec | 23 ++++++++++++++++++++--- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 3522c65..a8de773 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ wallpapoz-0.4.1-svn92_trunk.tar.bz2 +/wallpapoz-0.5.tar.bz2 diff --git a/sources b/sources index e1f4d70..c10d97b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5a993e9618690681805124f78c141170 wallpapoz-0.4.1-svn92_trunk.tar.bz2 +95231129c118034b0ae49e0960e409d9 wallpapoz-0.5.tar.bz2 diff --git a/wallpapoz.spec b/wallpapoz.spec index f1582bb..8c4e12f 100644 --- a/wallpapoz.spec +++ b/wallpapoz.spec @@ -5,10 +5,10 @@ %define srcurl http://wallpapoz.akbarhome.com/ %define icondir %{_datadir}/icons/hicolor/128x128/apps -%define mainver 0.4.1 +%define mainver 0.5 %undefine betaver -%define svnver svn92_trunk -%define fedorarel 24 +#%%define svnver svn92_trunk +%define fedorarel 1 %define rel %{?betaver:0.}%{fedorarel}%{?svnver:.%svnver}%{?betaver:.%betaver} @@ -97,12 +97,23 @@ wallpapers for different workspaces or virtual desktops. %patch9 -p1 -b .deletelastone %patch10 -p1 -b .deletefirst +# Umm... permission fix +find . -type f -print0 | xargs -0 chmod 0644 +grep -rl --null '#!/usr/bin' . | xargs -0 chmod 0755 + +# For setup +mkdir TMPBINDIR +pushd TMPBINDIR +ln -sf /bin/true xwininfo +popd + %build %install %{__rm} -rf $RPM_BUILD_ROOT %{__mkdir_p} $RPM_BUILD_ROOT%{_prefix} +export PATH=$(pwd)/TMPBINDIR:$PATH %{__python} setup.py install --installdir=$RPM_BUILD_ROOT%{_prefix} %{__sed} -i -e 's|%{name}\.png|%{name}|' \ @@ -150,6 +161,12 @@ popd %{_datadir}/applications/fedora-%{name}.desktop %changelog +* Thu Oct 7 2010 Mamoru Tasaka - 0.5-1 +- Update to 0.5 + +* Fri Jul 23 2010 Mamoru Tasaka +- F-14: rebuild against python 2.7 + * Tue Jun 15 2010 Mamoru Tasaka - 0.4.1-24.svn92_trunk - Fix backtrace when deleting first element in desktop (not workspace) mode (bug 597959) From fd7f27683668457eb373829a1b0c03ae71934604 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Thu, 11 Nov 2010 02:07:17 +0900 Subject: [PATCH 12/12] - Install C gnome help documents correctly (bug 651522) --- wallpapoz.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wallpapoz.spec b/wallpapoz.spec index 8c4e12f..5a3e6d0 100644 --- a/wallpapoz.spec +++ b/wallpapoz.spec @@ -8,7 +8,7 @@ %define mainver 0.5 %undefine betaver #%%define svnver svn92_trunk -%define fedorarel 1 +%define fedorarel 2 %define rel %{?betaver:0.}%{fedorarel}%{?svnver:.%svnver}%{?betaver:.%betaver} @@ -107,6 +107,9 @@ pushd TMPBINDIR ln -sf /bin/true xwininfo popd +# Install C gnome help documents (bug 651522) +ln -sf c share/gnome/help/wallpapoz/C + %build %install @@ -161,6 +164,9 @@ popd %{_datadir}/applications/fedora-%{name}.desktop %changelog +* Thu Dec 11 2010 Mamoru Tasaka - 0.5-2 +- Install C gnome help documents correctly (bug 651522) + * Thu Oct 7 2010 Mamoru Tasaka - 0.5-1 - Update to 0.5