{"thread":{"id":"21856","subject":"[PATCH] git-gui: suppress the X error on exit","startedAt":"2009-12-04T09:28:44Z","lastAt":"2009-12-04T15:57:51Z","messageCount":2,"participants":["Jindrich Makovicka","Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"129168","messageId":"20091204102844.3c720b21@starbug.prg01.itonis.net","threadId":"21856","inReplyTo":null,"subject":"[PATCH] git-gui: suppress the X error on exit","fromName":"Jindrich Makovicka","fromEmail":"makovick@gmail.com","sentAt":"2009-12-04T09:28:44Z","receivedAt":"2009-12-04T09:28:44Z","isPatch":true,"sender":{"key":"makovick@gmail.com","avatar":null},"body":"Hi,\n\nDue to a bug in Tk, git-gui almost always (unless git-gui is closed\nright after starting) produces an X window error message on exit,\nsomething like\n\nX Error of failed request:  RenderBadPicture (invalid Picture parameter)\n  Major opcode of failed request:  150 (RENDER)\n  Minor opcode of failed request:  7 (RenderFreePicture)\n  Picture id in failed request: 0x3a000dc\n  Serial number of failed request:  1965\n  Current serial number in output stream:  1980\n\nRespective Tk bug report is here:\n\nhttp://sourceforge.net/tracker/?func=detail&atid=112997&aid=1821174&group_id=12997\n\nThis bug is triggered only when the send command is blocked via\nrename send {} . The following patch re-enables send just\nbefore quiting git-gui to suppress the error.\n\n--- git-gui~\t2009-11-17 23:28:30.000000000 +0100\n+++ git-gui\t2009-12-03 23:32:50.848588924 +0100\n@@ -2023,6 +2023,10 @@\n \t}\n \n \tset ret_code $rc\n+\n+\t# briefly re-enable send to suppress the RenderBadPicture error\n+\ttk appname [appname]\n+\n \tdestroy .\n }\n \n"},{"id":"129193","messageId":"20091204155751.GB1483@spearce.org","threadId":"21856","inReplyTo":"20091204102844.3c720b21@starbug.prg01.itonis.net","subject":"Re: [PATCH] git-gui: suppress the X error on exit","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-12-04T15:57:51Z","receivedAt":"2009-12-04T15:57:51Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Jindrich Makovicka <makovick@gmail.com> wrote:\n> Due to a bug in Tk, git-gui almost always (unless git-gui is closed\n> right after starting) produces an X window error message on exit,\n> something like\n\nThanks.  I've wrapped it up into the following commit.  Can I get\na Signed-off-by line from you?\n\n--8<--\n[PATCH] git-gui: suppress RenderBadPicture X error caused by Tk bug\n\nDue to a bug in Tk, git-gui almost always (unless git-gui is closed\nright after starting) produces an X window error message on exit,\nsomething like:\n\nX Error of failed request:  RenderBadPicture (invalid Picture parameter)\n  Major opcode of failed request:  150 (RENDER)\n  Minor opcode of failed request:  7 (RenderFreePicture)\n  Picture id in failed request: 0x3a000dc\n  Serial number of failed request:  1965\n  Current serial number in output stream:  1980\n\nRespective Tk bug report is here:\n\nhttp://sourceforge.net/tracker/?func=detail&atid=112997&aid=1821174&group_id=12997\n\nThis bug is triggered only when the send command is blocked via\nrename send {} . The following patch re-enables send just before\nquiting git-gui to suppress the error.\n\nSigned-off-by: Shawn O. Pearce <spearce@spearce.org>\n---\n git-gui.sh |    5 +++++\n 1 files changed, 5 insertions(+), 0 deletions(-)\n\ndiff --git a/git-gui.sh b/git-gui.sh\nindex 037a1f2..718277a 100755\n--- a/git-gui.sh\n+++ b/git-gui.sh\n@@ -2052,6 +2052,11 @@ proc do_quit {{rc {1}}} {\n \t}\n \n \tset ret_code $rc\n+\n+\t# Briefly enable send again, working around Tk bug\n+\t# http://sourceforge.net/tracker/?func=detail&atid=112997&aid=1821174&group_id=12997\n+\ttk appname [appname]\n+\n \tdestroy .\n }\n \n-- \n1.6.6.rc0.324.gb5bf2\n\n-- \nShawn.\n"}]}