/*
- * Copyright (C) 2002 Ian Jackson <ian@chiark.greenend.org.uk>
+ * Copyright (C) 2002,2013 Ian Jackson <ian@chiark.greenend.org.uk>
*
* 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
* 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 <http://www.gnu.org/licenses/>.
*/
#include <X11/Xlib.h>
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
+#include <string.h>
+#include <unistd.h>
static Display *display;
static int selecting, l1_x, l1_y;
if (e->window != e->root) return;
- sw= XmuClientWindow(display, e->subwindow);
- if (!sw) {
+ if (!e->subwindow) {
if (!rightbutton) {
stopselecting();
} else {
return;
}
+ sw= XmuClientWindow(display, e->subwindow);
+
if (sw == w) { beep(); return; }
for (ownp=&headwn;