Author: charles                      Date: Wed Apr 18 23:09:14 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- updated for 1.7.1

---- Files affected:
packages/rdesktop:
   rdesktop-xinerama.patch (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: packages/rdesktop/rdesktop-xinerama.patch
diff -u packages/rdesktop/rdesktop-xinerama.patch:1.1 
packages/rdesktop/rdesktop-xinerama.patch:1.2
--- packages/rdesktop/rdesktop-xinerama.patch:1.1       Mon Jul 27 11:23:22 2009
+++ packages/rdesktop/rdesktop-xinerama.patch   Thu Apr 19 01:09:08 2012
@@ -1,6 +1,6 @@
---- configure.ac.orig  2008-06-25 23:22:27.000000000 +0200
-+++ configure.ac       2008-06-25 23:17:51.000000000 +0200
-@@ -18,6 +18,8 @@
+--- rdesktop/configure.ac
++++ rdesktop/configure.ac
+@@ -30,6 +30,8 @@
  AC_SEARCH_LIBS(socket, socket)
  AC_SEARCH_LIBS(inet_aton, resolv)
  
@@ -9,61 +9,60 @@
  AC_CHECK_HEADER(sys/select.h, AC_DEFINE(HAVE_SYS_SELECT_H))
  AC_CHECK_HEADER(sys/modem.h, AC_DEFINE(HAVE_SYS_MODEM_H))
  AC_CHECK_HEADER(sys/filio.h, AC_DEFINE(HAVE_SYS_FILIO_H))
---- xwin.c.orig        2008-06-25 23:50:02.000000000 +0200
-+++ xwin.c     2008-06-25 23:49:25.000000000 +0200
-@@ -21,6 +21,9 @@
- 
- #include <X11/Xlib.h>
- #include <X11/Xutil.h>
+--- rdesktop/xwin.c
++++ rdesktop/xwin.c
+@@ -31,6 +31,9 @@
+ #ifdef HAVE_XRANDR
+ #include <X11/extensions/Xrandr.h>
+ #endif
 +#ifdef HAVE_XINERAMA
-+ #include <X11/extensions/Xinerama.h>
++#include <X11/extensions/Xinerama.h>
 +#endif
- #include <X11/Xproto.h>
- #include <unistd.h>
- #include <sys/time.h>
-@@ -570,6 +573,71 @@
+ 
+ extern int g_sizeopt;
+ extern int g_width;
+@@ -816,6 +819,66 @@
  #define LOUT24(o, x) { *(o++) = x; *(o++) = x >> 8; *(o++) = x >> 16; }
  #define LOUT32(o, x) { *(o++) = x; *(o++) = x >> 8; *(o++) = x >> 16; *(o++) 
= x >> 24; }
  
 +#ifdef HAVE_XINERAMA
-+// IF XINERAMA LIBRARY
-+
-+int g_last_wnd_pos_x;
-+int g_last_wnd_pos_y;
-+
 +void
 +ScreenSize(XRectangle *screen)
 +{
 +      int screens;
 +      int event_base;
 +      int error_base;
++      int x, y, i, __unused_int;
++      unsigned int __unused_uint;
++      Window __unused_win;
 +
-+      if (XineramaQueryExtension(g_display, &event_base, &error_base))
++      if ((XineramaQueryExtension(g_display, &event_base, &error_base)) && 
(XineramaIsActive(g_display)))
 +      {
 +              XineramaScreenInfo *screeninfo;
-+              int i;
 +
-+              /* Get the Xinerama screen infomation. */
++              /* getting current cursor position */
++              XQueryPointer(g_display, RootWindowOfScreen(g_screen), 
&__unused_win, &__unused_win, &x, &y, &__unused_int, &__unused_int, 
&__unused_uint);
++
++              /* Get the Xinerama screen infomation */
 +              screeninfo = XineramaQueryScreens(g_display, &screens);
 +
-+              /* Search for the appropriate screen. */
++              /* Search for the appropriate screen */
 +              i = 0;
-+              while (!(screeninfo[i].x_org <= g_last_wnd_pos_x
-+                      && screeninfo[i].y_org <= g_last_wnd_pos_y
-+                      && screeninfo[i].x_org + screeninfo[i].width >= 
g_last_wnd_pos_x
-+                      && screeninfo[i].y_org + screeninfo[i].height >= 
g_last_wnd_pos_y ))
-+              {
++              while (!  (screeninfo[i].x_org <= x
++                      && screeninfo[i].y_org <= y
++                      && screeninfo[i].x_org + screeninfo[i].width >= x
++                      && screeninfo[i].y_org + screeninfo[i].height >= y ))
 +                      i++;
-+              }
-+              if (i >= screens) i = 0;
++              if (i >= screens)
++                      i = 0;
 +
-+              /* Position according to the present screen. */
++              /* Position according to the present screen */
 +              screen->x = screeninfo[i].x_org;
 +              screen->y = screeninfo[i].y_org;
 +              screen->width = screeninfo[i].width;
 +              screen->height = screeninfo[i].height;
 +
-+              /* Free allocated memory. */
++              /* Free allocated memory */
 +              XFree(screeninfo);
 +      }
 +      else
@@ -75,10 +74,7 @@
 +              screen->height = HeightOfScreen(g_screen);
 +      }
 +}
-+
 +#else
-+// IF NO XINERAMA LIBRARY
-+
 +void
 +ScreenSize(XRectangle *screen)
 +{
@@ -87,13 +83,12 @@
 +      screen->width = WidthOfScreen(g_screen);
 +      screen->height = HeightOfScreen(g_screen);
 +}
-+
 +#endif
 +
  static uint32
  translate_colour(uint32 colour)
  {
-@@ -1615,17 +1683,26 @@
+@@ -1912,17 +1975,26 @@
         */
        if (g_fullscreen)
        {
@@ -106,7 +101,7 @@
 +              g_height = screen.height;
                g_using_full_workarea = True;
        }
-       else if (g_width < 0)
+       else if (g_sizeopt < 0)
        {
 +              XRectangle screen;
 +              ScreenSize(&screen);
@@ -115,29 +110,29 @@
 +              g_height = screen.height;
 +
                /* Percent of screen */
-               if (-g_width >= 100)
+               if (-g_sizeopt >= 100)
                        g_using_full_workarea = True;
--              g_height = HeightOfScreen(g_screen) * (-g_width) / 100;
--              g_width = WidthOfScreen(g_screen) * (-g_width) / 100;
-+              g_width = screen.width * (-g_width) / 100;
-+              g_height = screen.height * (-g_width) / 100;
+-              g_height = HeightOfScreen(g_screen) * (-g_sizeopt) / 100;
+-              g_width = WidthOfScreen(g_screen) * (-g_sizeopt) / 100;
++               g_width = screen.width * (-g_width) / 100;
++               g_height = screen.height * (-g_width) / 100;
        }
-       else if (g_width == 0)
+       else if (g_sizeopt == 1)
        {
-@@ -1734,14 +1811,19 @@
+@@ -2005,14 +2077,19 @@
        long input_mask, ic_input_mask;
        XEvent xevent;
  
 -      wndwidth = g_fullscreen ? WidthOfScreen(g_screen) : g_width;
 -      wndheight = g_fullscreen ? HeightOfScreen(g_screen) : g_height;
 +      XRectangle screen;
-+
 +      ScreenSize(&screen);
+ 
 +      wndwidth = g_fullscreen ? screen.width : g_width;
 +      wndheight = g_fullscreen ? screen.height : g_height;
 +      g_xpos = g_fullscreen ? screen.x : g_xpos;
 +      g_ypos = g_fullscreen ? screen.y : g_ypos;
- 
++
        /* Handle -x-y portion of geometry string */
        if (g_xpos < 0 || (g_xpos == 0 && (g_pos & 2)))
 -              g_xpos = WidthOfScreen(g_screen) + g_xpos - g_width;
@@ -148,33 +143,3 @@
  
        get_window_attribs(&attribs);
  
-@@ -1882,6 +1964,11 @@
- void
- xwin_toggle_fullscreen(void)
- {
-+#ifdef HAVE_XINERAMA
-+      Window root, parent, *children;
-+      unsigned int nchildren;
-+      XWindowAttributes win_attrib;
-+#endif
-       Pixmap contents = 0;
- 
-       if (g_seamless_active)
-@@ -1895,6 +1982,17 @@
-               XCopyArea(g_display, g_wnd, contents, g_gc, 0, 0, g_width, 
g_height, 0, 0);
-       }
- 
-+#ifdef HAVE_XINERAMA
-+      /* Determine the parent window. */
-+      XQueryTree(g_display, g_wnd, &root, &parent, &children, &nchildren);
-+      if (children != NULL) XFree(children);
-+
-+      /* Find the present coordinates of the window. */
-+      XGetWindowAttributes(g_display, parent, &win_attrib);
-+      g_last_wnd_pos_x = win_attrib.x + 1;
-+      g_last_wnd_pos_y = win_attrib.y + 1;
-+#endif
-+
-       ui_destroy_window();
-       g_fullscreen = !g_fullscreen;
-       ui_create_window();
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/packages/rdesktop/rdesktop-xinerama.patch?r1=1.1&r2=1.2

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to