Enlightenment CVS committal

Author  : raster
Project : misc
Module  : feh

Dir     : misc/feh/src


Modified Files:
        winwidget.c 


Log Message:


feh fullscreen patch

===================================================================
RCS file: /cvs/e/misc/feh/src/winwidget.c,v
retrieving revision 1.118
retrieving revision 1.119
diff -u -3 -r1.118 -r1.119
--- winwidget.c 2 Jul 2004 21:06:16 -0000       1.118
+++ winwidget.c 3 Jul 2006 19:46:03 -0000       1.119
@@ -255,6 +255,33 @@
     XChangeProperty(disp, ret->win, prop, prop, 32, PropModeReplace,
                     (unsigned char *) &mwmhints, PROP_MWM_HINTS_ELEMENTS);
   }
+  /* The following NETWM hint fullscreen code is adapted from a few patches:
+   * http://www.davidsimmons.com/soft/xtermhacks/xterm-fullscreen.patch
+   * http://www.winehq.org/hypermail/wine-patches/2005/04/0347.html
+   * and seems to work with Metacity for me <Eric Shattow, [EMAIL PROTECTED]>
+   * This may break other WMs, I don't know what I'm doing. (ES 2005-11-25)
+   */
+  if (ret->full_screen) {
+       XEvent efs;
+       int operation = ret->full_screen ? 1 : 0; /* FIXME: put somewhere 
else... */
+    Atom atom_fullscreen = XInternAtom(disp, "_NET_WM_STATE_FULLSCREEN",  
False);
+       Atom atom_state      = XInternAtom(disp, "_NET_WM_STATE", False);
+
+       memset(&efs, 0, sizeof(efs));
+       efs.xclient.type = ClientMessage;
+       efs.xclient.message_type = atom_state;
+       efs.xclient.display = disp;
+       efs.xclient.window = ret->win;
+       efs.xclient.format = 32;
+       efs.xclient.data.l[0] = operation;
+       efs.xclient.data.l[1] = atom_fullscreen;
+
+/*  XSendEvent(disp, ret->win, False,
+               SubstructureRedirectMask, &efs);  //  doesn't work in Metacity
+*/
+    XChangeProperty(disp, ret->win, atom_state, XA_ATOM, 32, PropModeReplace,
+                                       (unsigned char*)&atom_fullscreen, 1); 
// works w/ Metacity
+  }
 
   XSetWMProtocols(disp, ret->win, &wmDeleteWindow, 1);
   winwidget_update_title(ret);
@@ -994,7 +1021,9 @@
     return;
 
   XGetGeometry(disp, winwid->win, &root, 
-               &(rect[0]), &(rect[1]), &(rect[2]), &(rect[3]), &bw, &bp);
+               &(rect[0]), &(rect[1]), (unsigned int *) &(rect[2]),
+                          (unsigned int *) &(rect[3]), (unsigned int *) &bw,
+                          (unsigned int *) &bp);
 
   /* update the window geometry (in case it's inaccurate) */
   winwid->x = rect[0];



Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to