aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/devdraw
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2020-01-15 11:59:45 -0500
committerRuss Cox <rsc@swtch.com>2020-01-15 12:01:12 -0500
commit0be57355f912dbedb76cea1a7a4f9a1deb5bde2b (patch)
tree89c292de789dc4932a102818931d3798ecd831a6 /src/cmd/devdraw
parent4241cae2a1ffe7a499ffd9d028e001fea7a678d6 (diff)
downloadplan9port-0be57355f912dbedb76cea1a7a4f9a1deb5bde2b.tar.gz
plan9port-0be57355f912dbedb76cea1a7a4f9a1deb5bde2b.tar.bz2
plan9port-0be57355f912dbedb76cea1a7a4f9a1deb5bde2b.zip
devdraw: avoid deadlock in x11 resize
Fixes #347.
Diffstat (limited to 'src/cmd/devdraw')
-rw-r--r--src/cmd/devdraw/x11-inc.h1
-rw-r--r--src/cmd/devdraw/x11-screen.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/cmd/devdraw/x11-inc.h b/src/cmd/devdraw/x11-inc.h
index dca3ebcd..ab4c2505 100644
--- a/src/cmd/devdraw/x11-inc.h
+++ b/src/cmd/devdraw/x11-inc.h
@@ -17,6 +17,7 @@
#include <X11/IntrinsicP.h>
#include <X11/StringDefs.h>
#ifdef SHOWEVENT
+#include <stdio.h>
#include "../rio/showevent/ShowEvent.c"
#endif
diff --git a/src/cmd/devdraw/x11-screen.c b/src/cmd/devdraw/x11-screen.c
index d01e8496..62f49f2f 100644
--- a/src/cmd/devdraw/x11-screen.c
+++ b/src/cmd/devdraw/x11-screen.c
@@ -1042,7 +1042,9 @@ _xreplacescreenimage(Client *client)
w->nextscreenpm = pixmap;
w->screenr = r;
client->mouserect = r;
+ xunlock();
gfx_replacescreenimage(client, m);
+ xlock();
return 1;
}