X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=chiark-utils.git;a=blobdiff_plain;f=cprogs%2Fxduplic-copier.c;h=80374f96fc5a8d57c7b1f5fbfdd3baae235688d4;hp=ff0830d27f13ac3ae931db6342c824758660723a;hb=66446a0bdb71771196c4e90f935ad04a2259ab73;hpb=8f86fa5f8c65066c31acc930a3bd094f7381a2e4 diff --git a/cprogs/xduplic-copier.c b/cprogs/xduplic-copier.c index ff0830d..80374f9 100644 --- a/cprogs/xduplic-copier.c +++ b/cprogs/xduplic-copier.c @@ -1,9 +1,9 @@ /* - * Copyright (C) 2002 Ian Jackson + * Copyright (C) 2002,2013 Ian Jackson * * This is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2, + * published by the Free Software Foundation; either version 3, * or (at your option) any later version. * * This is distributed in the hope that it will be useful, but @@ -11,9 +11,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public - * License along with this file; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ #include @@ -25,6 +24,8 @@ #include #include #include +#include +#include static Display *display; static int selecting, l1_x, l1_y; @@ -143,8 +144,7 @@ static void buttonpress(XButtonEvent *e) { if (e->window != e->root) return; - sw= XmuClientWindow(display, e->subwindow); - if (!sw) { + if (!e->subwindow) { if (!rightbutton) { stopselecting(); } else { @@ -159,6 +159,8 @@ static void buttonpress(XButtonEvent *e) { return; } + sw= XmuClientWindow(display, e->subwindow); + if (sw == w) { beep(); return; } for (ownp=&headwn;