[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#469291: compiz: Raise-on-click incorrectly react with small resolution



Package: compiz
Version: 0.6.3~git20071222.061ff159-1
Severity: minor
Tags: patch

When 'raise on click' option activated, maximized windows bigger than 
your 
resolution and cannot be reduced (like ccsm and 800x480) will be 
moved when 
you click on the window.

Step to reproduce:
    - Activate 'raise on click option' in ccsm
    - Open a window who is by default bigger than your workspace can 
display (depending on your resolution)
    - Clic on this window. If your window is just highter, the top of 
the window will be placed bellow on top of your workspace, and the 
bottom of the window will be bellow the bottom of your screen.
    - Then, reClick on this window, the bottom of the window will be 
placed on the bottom of your screen, and the top of the window will 
be above the top of your screen.
    - Then, reClick... the window will move alternately up and down.

Same issue if your window is wider than your screen.


-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-3-686 (SMP w/1 CPU core)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages compiz depends on:
ii  compiz-core 0.6.3~git20071222.061ff159-1 OpenGL window and compositing mana
ii  compiz-gnom 0.6.3~git20071222.061ff159-1 OpenGL window and compositing mana
ii  compiz-gtk  0.6.3~git20071222.061ff159-1 OpenGL window and compositing mana
ii  compiz-plug 0.6.3~git20071222.061ff159-1 OpenGL window and compositing mana

compiz recommends no packages.

-- no debconf information
diff -Naur src/window.c src_mod/window.c
--- a/src/window.c	2008-03-04 01:15:11.000000000 +0100
+++ b/src/window.c	2008-03-04 12:37:14.000000000 +0100
@@ -3527,15 +3527,14 @@

 	    if (w->state & CompWindowStateMaximizedVertMask)
 	    {
-		if (oldY < y + workArea.y + w->input.top)
+        height = xwc->height + oldBorderWidth * 2;
+		if (oldY < y + workArea.y + w->input.top || height > y + workArea.y +workArea.height)
 		{
 		    xwc->y = y + workArea.y + w->input.top;
 		    mask |= CWY;
 		}
 		else
 		{
-		    height = xwc->height + oldBorderWidth * 2;
-
 		    max = y + workArea.y + workArea.height;
 		    if (oldY + oldHeight + w->input.bottom > max)
 		    {
@@ -3554,16 +3553,16 @@

 	    if (w->state & CompWindowStateMaximizedHorzMask)
 	    {
-		if (oldX < x + workArea.x + w->input.left)
+        width = xwc->width + oldBorderWidth * 2;
+		if (oldX < x + workArea.x + w->input.left || width > x + workArea.x + workArea.width)
 		{
 		    xwc->x = x + workArea.x + w->input.left;
 		    mask |= CWX;
 		}
 		else
 		{
-		    width = xwc->width + oldBorderWidth * 2;
-
 		    max = x + workArea.x + workArea.width;
+
 		    if (oldX + oldWidth + w->input.right > max)
 		    {
 			xwc->x = max - width - w->input.right;

Reply to: