Hi,

There are a couple of problems with Snapping Windows that I tried to fix:

(1) The snap to windows checkbox in ccsm has no effect because Snap treats
any window with struts as an edge, and all windows have struts. I think it
should be a test for dock windows.
(2) Windows don't snap to the left edge because it has been erased. The
right edge doesn't seem to get erased because it is slightly offscreen, so I
did the same thing with the left. I don't know if that is exactly the right
solution, but at least it works.

Patches are attached.

Thanks,
Jay
diff --git a/src/snap.cpp b/src/snap.cpp
index 83375b6..fd26378 100644
--- a/src/snap.cpp
+++ b/src/snap.cpp
@@ -138,7 +138,7 @@ isSnapWindow (CompWindow *w)
     if ((w->type () & SNAP_WINDOW_TYPE) && 
 	(ss->optionGetEdgesCategoriesMask () & EdgesCategoriesWindowEdgesMask))
 	return true;
-    if (w->struts () && 
+    if ((w->type () & CompWindowTypeDockMask) && 
 	(ss->optionGetEdgesCategoriesMask () & EdgesCategoriesScreenEdgesMask))
 	return true;
     return false;
diff --git a/src/snap.cpp b/src/snap.cpp
index fd26378..18f6944 100644
--- a/src/snap.cpp
+++ b/src/snap.cpp
@@ -265,7 +265,7 @@ SnapWindow::updateScreenEdges ()
 		 BottomEdge, true);
 	addEdge (0, area.bottom (), area.left (), area.right () - 1,
 		 TopEdge, true);
-	addEdge (0, area.left (), area.top (), area.bottom () - 1,
+	addEdge (0, area.left ()-1, area.top (), area.bottom () - 1,
 		 RightEdge, true);
 	addEdge (0, area.right (), area.top (), area.bottom () - 1,
 		 LeftEdge, true);
_______________________________________________
compiz mailing list
compiz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/compiz

Reply via email to