Package: xjig Version: 2.4-11.1 Severity: normal Tags: patch When -side 2 (or -side 1) is specified, you can still flip pieces over accidentally by middle clicking them. This is quite frustrating when it happens, as it is far too easy to accidentally middle click when you meant to middle drag. I have attached a patch to disable flipping pieces when -side lock is used.
-- System Information: Debian Release: 4.0 APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.18-4-k7 Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1) Versions of packages xjig depends on: ii libc6 2.3.6.ds1-13 GNU C Library: Shared libraries ii libgcc1 1:4.1.1-21 GCC support library ii libjpeg62 6b-13 The Independent JPEG Group's JPEG ii libnetpbm10 2:10.0-11 Shared libraries for netpbm ii libstdc++6 4.1.1-21 The GNU Standard C++ Library v3 ii libx11-6 2:1.0.3-6 X11 client-side library ii libxext6 1:1.0.1-2 X11 miscellaneous extension librar xjig recommends no packages. -- no debconf information
diff -ru xjig-2.4/objects.C xjig-2.4.new/objects.C --- xjig-2.4/objects.C 2007-04-05 09:06:19.000000000 -0300 +++ xjig-2.4.new/objects.C 2007-04-05 09:04:18.000000000 -0300 @@ -971,7 +971,7 @@ } void MoveablePiece::DispatchPress( XButtonEvent * xbutton ) { - if (xbutton->state&ControlMask) { + if (side_lock<0 && xbutton->state&ControlMask) { // printf( "doing the flip ...\n" ); mystack->Raise(this); FlipOver( Vec2(xbutton->x,xbutton->y) ); @@ -1072,7 +1072,7 @@ } turnflag=0; } - else if (xbutton->time-start_time<300&&xbutton->button==Button2&&!(xbutton->state&~Button2Mask)) { + else if (side_lock<0 && xbutton->time-start_time<300&&xbutton->button==Button2&&!(xbutton->state&~Button2Mask)) { FlipOver(Vec2(xbutton->x,xbutton->y)); } else if (xbutton->state&Button1Mask)