]> git.pld-linux.org Git - packages/rdesktop.git/commitdiff
- Added xinerama patch from http://kom.aau.dk/~raller/rdesktop-xinerama.patch
authorkosmo <kosmo@pld-linux.org>
Mon, 27 Jul 2009 09:23:22 +0000 (09:23 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  which fixes full screen behaviour on Xinerama enabled displays.
- Release 3.

Changed files:
    rdesktop-xinerama.patch -> 1.1
    rdesktop.spec -> 1.44

rdesktop-xinerama.patch [new file with mode: 0644]
rdesktop.spec

diff --git a/rdesktop-xinerama.patch b/rdesktop-xinerama.patch
new file mode 100644 (file)
index 0000000..3421cc5
--- /dev/null
@@ -0,0 +1,180 @@
+--- 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 @@
+ AC_SEARCH_LIBS(socket, socket)
+ AC_SEARCH_LIBS(inet_aton, resolv)
++AC_CHECK_LIB(Xinerama, XineramaQueryScreens, AC_DEFINE(HAVE_XINERAMA) LIBS="$LIBS -lXinerama", [], [])
++
+ 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>
++#ifdef HAVE_XINERAMA
++ #include <X11/extensions/Xinerama.h>
++#endif
+ #include <X11/Xproto.h>
+ #include <unistd.h>
+ #include <sys/time.h>
+@@ -570,6 +573,71 @@
+ #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;
++
++      if (XineramaQueryExtension(g_display, &event_base, &error_base))
++      {
++              XineramaScreenInfo *screeninfo;
++              int i;
++
++              /* Get the Xinerama screen infomation. */
++              screeninfo = XineramaQueryScreens(g_display, &screens);
++
++              /* 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 ))
++              {
++                      i++;
++              }
++              if (i >= screens) i = 0;
++
++              /* 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. */
++              XFree(screeninfo);
++      }
++      else
++      {
++              /* Xinerama is not in use, default to the XLib screensize call. */
++              screen->x = 0;
++              screen->y = 0;
++              screen->width = WidthOfScreen(g_screen);
++              screen->height = HeightOfScreen(g_screen);
++      }
++}
++
++#else
++// IF NO XINERAMA LIBRARY
++
++void
++ScreenSize(XRectangle *screen)
++{
++      screen->x = 0;
++      screen->y = 0;
++      screen->width = WidthOfScreen(g_screen);
++      screen->height = HeightOfScreen(g_screen);
++}
++
++#endif
++
+ static uint32
+ translate_colour(uint32 colour)
+ {
+@@ -1615,17 +1683,26 @@
+        */
+       if (g_fullscreen)
+       {
+-              g_width = WidthOfScreen(g_screen);
+-              g_height = HeightOfScreen(g_screen);
++              XRectangle screen;
++              ScreenSize(&screen);
++
++              g_width = screen.width;
++              g_height = screen.height;
+               g_using_full_workarea = True;
+       }
+       else if (g_width < 0)
+       {
++              XRectangle screen;
++              ScreenSize(&screen);
++
++              g_width = screen.width;
++              g_height = screen.height;
++
+               /* Percent of screen */
+               if (-g_width >= 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;
+       }
+       else if (g_width == 0)
+       {
+@@ -1734,14 +1811,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;
++              g_xpos = screen.width + g_xpos - g_width;
+       if (g_ypos < 0 || (g_ypos == 0 && (g_pos & 4)))
+-              g_ypos = HeightOfScreen(g_screen) + g_ypos - g_height;
++              g_ypos = screen.height + g_ypos - g_height;
+       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();
index 70d971f93db459b9d8e89a65cc8e26f2b7e91ef6..63469dca0ef4cb8e31be64577d9b099646ecbe1a 100644 (file)
@@ -6,18 +6,20 @@ Summary:      RDP client for accessing Windows NT Terminal Server
 Summary(pl.UTF-8):     Klient RDP umożliwiający dostęp do Terminal Serwera WinNT
 Name:          rdesktop
 Version:       1.6.0
-Release:       2
+Release:       3
 License:       GPL
 Group:         X11/Applications/Networking
 Source0:       http://dl.sourceforge.net/rdesktop/%{name}-%{version}.tar.gz
 # Source0-md5: c6fcbed7f0ad7e60ac5fcb2d324d8b16
 Patch0:                %{name}-vnc.patch
+Patch1:                %{name}-xinerama.patch
 URL:           http://www.rdesktop.org/
 BuildRequires: alsa-lib-devel
 %{?with_vnc:BuildRequires:     libvncserver-devel}
 BuildRequires: openssl-devel >= 0.9.7d
 BuildRequires: pcsc-lite-devel
 BuildRequires: xorg-lib-libX11-devel
+BuildRequires: xorg-proto-xineramaproto-devel
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -35,8 +37,11 @@ wymagane żadne rozszerzenia po stronie serwera.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p0
 
 %build
+%{__aclocal}
+%{__autoconf}
 %configure \
        %{?with_vnc:--with-libvncserver} \
        --enable-smartcard \
This page took 0.111514 seconds and 4 git commands to generate.