rpms/compiz-fusion/devel compiz-fusion.spec, 1.16, 1.17 workarounds-fullscreenfix.patch, 1.1, 1.2

Adel Gadllah (drago01) fedora-extras-commits at redhat.com
Thu Dec 27 14:46:10 UTC 2007


Author: drago01

Update of /cvs/pkgs/rpms/compiz-fusion/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13547

Modified Files:
	compiz-fusion.spec workarounds-fullscreenfix.patch 
Log Message:
Don't break legacy apps that want to unfullscreen themselves


Index: compiz-fusion.spec
===================================================================
RCS file: /cvs/pkgs/rpms/compiz-fusion/devel/compiz-fusion.spec,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- compiz-fusion.spec	25 Dec 2007 13:06:12 -0000	1.16
+++ compiz-fusion.spec	27 Dec 2007 14:45:33 -0000	1.17
@@ -2,7 +2,7 @@
 
 Name: compiz-fusion
 Version: 0.6.0       
-Release: 8%{?dist}
+Release: 9%{?dist}
 Summary: Collection of Compiz Fusion plugins for Compiz      
 
 Group: User Interface/Desktops        
@@ -131,6 +131,9 @@
 
 
 %changelog
+* Thu Dec 27 2007 Adel Gadllah <adel.gadllah at gmail.com> 0.6.0-9
+- Don't break legacy apps that want to unfullscreen themselves
+
 * Tue Dec 25 2007 Adel Gadllah <adel.gadllah at gmail.com> 0.6.0-8
 - Fix fullscreen for flash windows when legacy fullscreen is 
   enabled.

workarounds-fullscreenfix.patch:

Index: workarounds-fullscreenfix.patch
===================================================================
RCS file: /cvs/pkgs/rpms/compiz-fusion/devel/workarounds-fullscreenfix.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- workarounds-fullscreenfix.patch	25 Dec 2007 13:06:12 -0000	1.1
+++ workarounds-fullscreenfix.patch	27 Dec 2007 14:45:33 -0000	1.2
@@ -1,7 +1,24 @@
 diff -upNr compiz-fusion-plugins-main-0.6.0.orign/src/workarounds/workarounds.c compiz-fusion-plugins-main-0.6.0/src/workarounds/workarounds.c
 --- compiz-fusion-plugins-main-0.6.0.orign/src/workarounds/workarounds.c	2007-10-15 19:43:43.000000000 +0200
-+++ compiz-fusion-plugins-main-0.6.0/src/workarounds/workarounds.c	2007-12-25 13:47:44.000000000 +0100
-@@ -196,8 +196,7 @@ workaroundsFixupFullscreen (CompWindow *
++++ compiz-fusion-plugins-main-0.6.0/src/workarounds/workarounds.c	2007-12-27 15:32:04.000000000 +0100
+@@ -51,6 +51,16 @@ typedef struct _WorkaroundsWindow {
+     Bool isFullscreen;
+ } WorkaroundsWindow;
+ 
++struct _WorkaroundsManagedFsWindow {
++	Window id;
++	struct _WorkaroundsManagedFsWindow *next;
++};
++
++typedef struct _WorkaroundsManagedFsWindow WorkaroundsManagedFsWindow;
++
++WorkaroundsManagedFsWindow *mfwList = NULL;
++
++
+ #define GET_WORKAROUNDS_DISPLAY(d) \
+     ((WorkaroundsDisplay *) (d)->privates[displayPrivateIndex].ptr)
+ 
+@@ -196,8 +206,7 @@ workaroundsFixupFullscreen (CompWindow *
      }
  
      ww->isFullscreen = isFullSize;
@@ -11,3 +28,91 @@
      {
  	unsigned int state = w->state & ~CompWindowStateFullscreenMask;
  
+@@ -211,8 +220,59 @@ workaroundsFixupFullscreen (CompWindow *
+ 	    recalcWindowType (w);
+ 	    recalcWindowActions (w);
+ 	    updateWindowAttributes (w, CompStackingUpdateModeNormal);
++
++	    /*keep track of windows that we interact with*/
++
++	    if(mfwList == NULL) 
++	    {
++		mfwList = (WorkaroundsManagedFsWindow*)malloc(sizeof(WorkaroundsManagedFsWindow));
++		mfwList->id = w->id;
++		mfwList->next = NULL;
++	    }
++	    else 
++            {
++                WorkaroundsManagedFsWindow *mfw;
++		for(mfw = mfwList; mfw->next != NULL; mfw = mfw->next) 
++		{
++		    mfw->next = (WorkaroundsManagedFsWindow*)malloc(sizeof(WorkaroundsManagedFsWindow));
++		    mfw = mfw->next;
++		    mfw->id = w->id;
++		    mfw->next = NULL;
++		}
++		
++	    }
++		    
+ 	}
+     }
++    else if(!isFullSize && (w->state & CompWindowStateFullscreenMask) && mfwList) {
++	/*did we set the flag?*/
++	WorkaroundsManagedFsWindow *mfw;
++
++	for(mfw = mfwList; mfw->next != NULL; mfw = mfw->next) 
++	{
++		if(mfw->id == w->id) 
++		{
++			unsigned int state = w->state & ~CompWindowStateFullscreenMask;
++
++			if (isFullSize)
++	  		  state |= CompWindowStateFullscreenMask;
++
++			ww->madeFullscreen = isFullSize;
++
++			if (state != w->state)
++			{
++	 		   changeWindowState (w, state);
++	 		   recalcWindowType (w);
++	 		   recalcWindowActions (w);
++	 		   updateWindowAttributes (w, CompStackingUpdateModeNormal);
++			}
++			break;
++		}
++	
++    	}
++   }
++	
++
+ }
+ 
+ static void
+@@ -356,6 +416,27 @@ workaroundsHandleEvent (CompDisplay *d,
+ 	if (w && w->attrib.override_redirect)
+ 	    workaroundsDoFixes (w);
+ 	break;
++    case DestroyNotify:
++	w = findWindowAtDisplay (d, event->xdestroywindow.window);
++	WorkaroundsManagedFsWindow *mfw, *mfwPrev;
++	if(mfwList == NULL) break;
++	if(mfwList->id == w->id ) {
++	    mfw = mfwList;
++	    mfwList = mfwList->next;
++	    free(mfw);
++	    break;
++	}
++	mfwPrev = mfwList;
++	for(mfw = mfwList; mfw->next != NULL; mfw = mfw->next) 
++	{
++	    if(mfw->id == w->id) 
++	    {
++	        mfwPrev->next=mfw->next;
++	        free(mfw);				
++	    }
++	    mfwPrev = mfw;
++	}
++	break;
+     }
+ 
+     UNWRAP (wd, d, handleEvent);




More information about the fedora-extras-commits mailing list