diff --git a/src/wmframe.cc b/src/wmframe.cc index f7c68c645..779c8dffa 100644 --- a/src/wmframe.cc +++ b/src/wmframe.cc @@ -1043,7 +1043,7 @@ void YFrameWindow::handleClick(const XButtonEvent &up, int click) { YPopupWindow::pfCanFlipHorizontal | YPopupWindow::pfPopupMenu); } - else if (up.button == Button1 && up.window != up.subwindow && + else if (up.button == Button1 && up.subwindow && click == 2 && isResizable() && !isFullscreen()) { YRect geo(geometry()), res(geo); if (origW < 1 || origH < 1) { diff --git a/src/ywindow.cc b/src/ywindow.cc index c7705a68a..5f1b13a5e 100644 --- a/src/ywindow.cc +++ b/src/ywindow.cc @@ -897,8 +897,8 @@ void YWindow::handleMotion(const XMotionEvent &motion) { if (fClickDrag) { handleDrag(fClickEvent, motion); } - else if ((motion.state & xapp->ButtonMask) / Button1Mask - == fClickButton) { + else if (int(motion.state & xapp->ButtonMask) == + Button1Mask << (fClickButton - Button1)) { if (motion.time >= fClickTime + ClickMotionDelay || sqr(motion.x_root - fClickEvent.x_root) + sqr(motion.y_root - fClickEvent.y_root) >=