Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 38544 | Differences between
and this patch

Collapse All | Expand All

(-)thinkeramik-3.0/kwin/thinkeramik.cpp.orig (-14 / +14 lines)
Lines 1722-1728 void ThinKeramikClient::mouseDoubleClick Link Here
1722
}
1722
}
1723
1723
1724
1724
1725
ThinKeramikClient::MousePosition ThinKeramikClient::mousePosition( const QPoint &p ) const
1725
ThinKeramikClient::Position ThinKeramikClient::mousePosition(const QPoint& p) const
1726
{
1726
{
1727
	int titleBaseY = (largeTitlebar ? 3 : 0);
1727
	int titleBaseY = (largeTitlebar ? 3 : 0);
1728
1728
Lines 1738-1744 ThinKeramikClient::MousePosition ThinKer Link Here
1738
			if ( (p.y() < titleBaseY + 3 && p.x() < leftBorder + 11) ||
1738
			if ( (p.y() < titleBaseY + 3 && p.x() < leftBorder + 11) ||
1739
					(p.y() < titleBaseY + 6 && p.x() < leftBorder + 6) ||
1739
					(p.y() < titleBaseY + 6 && p.x() < leftBorder + 6) ||
1740
					(p.y() < titleBaseY + 11 && p.x() < leftBorder + 3) )
1740
					(p.y() < titleBaseY + 11 && p.x() < leftBorder + 3) )
1741
				return KDecorationDefines::TopLeft2;
1741
				return KDecorationDefines::PositionTopLeft;
1742
		}
1742
		}
1743
1743
1744
		// Test for the top right corner
1744
		// Test for the top right corner
Lines 1746-1761 ThinKeramikClient::MousePosition ThinKer Link Here
1746
			if ( (p.y() < titleBaseY + 3 && p.x() > rightBorder - 11) ||
1746
			if ( (p.y() < titleBaseY + 3 && p.x() > rightBorder - 11) ||
1747
					(p.y() < titleBaseY + 6 && p.x() > rightBorder - 6) ||
1747
					(p.y() < titleBaseY + 6 && p.x() > rightBorder - 6) ||
1748
					(p.y() < titleBaseY + 11 && p.x() > rightBorder - 3) )
1748
					(p.y() < titleBaseY + 11 && p.x() > rightBorder - 3) )
1749
				return KDecorationDefines::TopRight2;
1749
				return KDecorationDefines::PositionTopRight;
1750
		}
1750
		}
1751
1751
1752
		// Test for the top border
1752
		// Test for the top border
1753
		if ( p.y() <= 3 || (p.y() <= titleBaseY+3 &&
1753
		if ( p.y() <= 3 || (p.y() <= titleBaseY+3 &&
1754
					(p.x() < captionRect.left() || p.x() > captionRect.right()) ) )
1754
					(p.x() < captionRect.left() || p.x() > captionRect.right()) ) )
1755
			return KDecorationDefines::Top;
1755
			return KDecorationDefines::PositionTop;
1756
1756
1757
		// The cursor must be over the center of the titlebar.
1757
		// The cursor must be over the center of the titlebar.
1758
		return KDecorationDefines::Center;
1758
		return KDecorationDefines::PositionCenter;
1759
	}
1759
	}
1760
1760
1761
	// Test the sides
1761
	// Test the sides
Lines 1763-1801 ThinKeramikClient::MousePosition ThinKer Link Here
1763
		// Test for the left side
1763
		// Test for the left side
1764
		if ( p.x() < leftBorder ) {
1764
		if ( p.x() < leftBorder ) {
1765
			if ( p.y() < height() - bottomCornerSize )
1765
			if ( p.y() < height() - bottomCornerSize )
1766
				return KDecorationDefines::Left;
1766
				return KDecorationDefines::PositionLeft;
1767
			else
1767
			else
1768
				return KDecorationDefines::BottomLeft2;
1768
				return KDecorationDefines::PositionBottomLeft;
1769
		}
1769
		}
1770
1770
1771
		// Test for the right side
1771
		// Test for the right side
1772
		else if ( p.x() > rightBorder ) {
1772
		else if ( p.x() > rightBorder ) {
1773
			if ( p.y() < height() - bottomCornerSize )
1773
			if ( p.y() < height() - bottomCornerSize )
1774
				return KDecorationDefines::Right;
1774
				return KDecorationDefines::PositionRight;
1775
			else
1775
			else
1776
				return KDecorationDefines::BottomRight2;
1776
				return KDecorationDefines::PositionBottomRight;
1777
		}
1777
		}
1778
1778
1779
		// The cursor must be over the center of the window
1779
		// The cursor must be over the center of the window
1780
		return KDecorationDefines::Center;
1780
		return KDecorationDefines::PositionCenter;
1781
	}
1781
	}
1782
1782
1783
	// Test the grab bar / bottom border
1783
	// Test the grab bar / bottom border
1784
	else {
1784
	else {
1785
		// Test for the bottom left corner
1785
		// Test for the bottom left corner
1786
		if ( p.x() < bottomCornerSize )
1786
		if ( p.x() < bottomCornerSize )
1787
			return KDecorationDefines::BottomLeft2;
1787
			return KDecorationDefines::PositionBottomLeft;
1788
1788
1789
		// Test for the bottom right corner
1789
		// Test for the bottom right corner
1790
		else if ( p.x() > width() - bottomCornerSize - 1 )
1790
		else if ( p.x() > width() - bottomCornerSize - 1 )
1791
			return KDecorationDefines::BottomRight2;
1791
			return KDecorationDefines::PositionBottomRight;
1792
1792
1793
		// The cursor must be over the bottom border
1793
		// The cursor must be over the bottom border
1794
		return KDecorationDefines::Bottom;
1794
		return KDecorationDefines::PositionBottom;
1795
	}
1795
	}
1796
1796
1797
	// We should never get here
1797
	// We should never get here
1798
	return KDecorationDefines::Nowhere;
1798
	return KDecorationDefines::PositionCenter;
1799
}
1799
}
1800
1800
1801
1801

Return to bug 38544