/[rdesktop]/sourceforge.net/branches/seamlessrdp-branch/rdesktop/xwin.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/branches/seamlessrdp-branch/rdesktop/xwin.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1123 by astrand, Wed Mar 15 08:41:48 2006 UTC revision 1132 by astrand, Wed Mar 15 12:58:50 2006 UTC
# Line 56  typedef struct _seamless_window Line 56  typedef struct _seamless_window
56          unsigned long id;          unsigned long id;
57          int xoffset, yoffset;          int xoffset, yoffset;
58          int width, height;          int width, height;
59          unsigned int state;     /* normal/minimized/maximized */          int state;              /* normal/minimized/maximized. */
60          unsigned int desktop;          unsigned int desktop;
61          struct _seamless_window *next;          struct _seamless_window *next;
62  } seamless_window;  } seamless_window;
# Line 3044  ui_seamless_create_window(unsigned long Line 3044  ui_seamless_create_window(unsigned long
3044          Window wnd;          Window wnd;
3045          XSetWindowAttributes attribs;          XSetWindowAttributes attribs;
3046          XClassHint *classhints;          XClassHint *classhints;
3047            XSizeHints *sizehints;
3048          long input_mask;          long input_mask;
3049          seamless_window *sw, *sw_parent;          seamless_window *sw, *sw_parent;
3050    
# Line 3055  ui_seamless_create_window(unsigned long Line 3056  ui_seamless_create_window(unsigned long
3056          get_window_attribs(&attribs);          get_window_attribs(&attribs);
3057          attribs.override_redirect = False;          attribs.override_redirect = False;
3058    
3059          /* FIXME: Do not assume that -1, -1 is outside screen Consider          wnd = XCreateWindow(g_display, RootWindowOfScreen(g_screen), -1, -1, 1, 1, 0, g_depth,
            wait with showing the window until STATE and others have  
            been recieved. */  
         wnd = XCreateWindow(g_display, RootWindowOfScreen(g_screen), -1, -1, 1, 1, 0, 0,  
3060                              InputOutput, g_visual,                              InputOutput, g_visual,
3061                              CWBackPixel | CWBackingStore | CWOverrideRedirect | CWColormap |                              CWBackPixel | CWBackingStore | CWOverrideRedirect | CWColormap |
3062                              CWBorderPixel, &attribs);                              CWBorderPixel, &attribs);
# Line 3075  ui_seamless_create_window(unsigned long Line 3073  ui_seamless_create_window(unsigned long
3073                  XFree(classhints);                  XFree(classhints);
3074          }          }
3075    
3076            /* WM_NORMAL_HINTS */
3077            sizehints = XAllocSizeHints();
3078            if (sizehints != NULL)
3079            {
3080                    sizehints->flags = USPosition;
3081                    XSetWMNormalHints(g_display, wnd, sizehints);
3082                    XFree(sizehints);
3083            }
3084    
3085          /* Set WM_TRANSIENT_FOR, if necessary */          /* Set WM_TRANSIENT_FOR, if necessary */
3086          if (parent)          if (parent)
3087          {          {
# Line 3092  ui_seamless_create_window(unsigned long Line 3099  ui_seamless_create_window(unsigned long
3099    
3100          XSelectInput(g_display, wnd, input_mask);          XSelectInput(g_display, wnd, input_mask);
3101    
         XMapWindow(g_display, wnd);  
   
3102          /* handle the WM_DELETE_WINDOW protocol. FIXME: When killing a          /* handle the WM_DELETE_WINDOW protocol. FIXME: When killing a
3103             seamless window, we could try to close the window on the             seamless window, we could try to close the window on the
3104             serverside, instead of terminating rdesktop */             serverside, instead of terminating rdesktop */
# Line 3106  ui_seamless_create_window(unsigned long Line 3111  ui_seamless_create_window(unsigned long
3111          sw->yoffset = 0;          sw->yoffset = 0;
3112          sw->width = 0;          sw->width = 0;
3113          sw->height = 0;          sw->height = 0;
3114            sw->state = SEAMLESSRDP_NOTYETMAPPED;
3115            sw->desktop = 0;
3116          sw->next = g_seamless_windows;          sw->next = g_seamless_windows;
3117          g_seamless_windows = sw;          g_seamless_windows = sw;
3118  }  }
# Line 3157  ui_seamless_move_window(unsigned long id Line 3164  ui_seamless_move_window(unsigned long id
3164    
3165          /* If we move the window in a maximized state, then KDE won't          /* If we move the window in a maximized state, then KDE won't
3166             accept restoration */             accept restoration */
3167          if (sw->state != SEAMLESSRDP_NORMAL)          switch (sw->state)
3168                  return;          {
3169                    case SEAMLESSRDP_MINIMIZED:
3170                    case SEAMLESSRDP_MAXIMIZED:
3171                            return;
3172            }
3173    
3174          /* FIXME: Perhaps use ewmh_net_moveresize_window instead */          /* FIXME: Perhaps use ewmh_net_moveresize_window instead */
3175          XMoveResizeWindow(g_display, sw->wnd, sw->xoffset, sw->yoffset, sw->width, sw->height);          XMoveResizeWindow(g_display, sw->wnd, sw->xoffset, sw->yoffset, sw->width, sw->height);
# Line 3193  ui_seamless_setstate(unsigned long id, u Line 3204  ui_seamless_setstate(unsigned long id, u
3204                  return;                  return;
3205          }          }
3206    
3207            if (sw->state == SEAMLESSRDP_NOTYETMAPPED)
3208            {
3209                    XMapWindow(g_display, sw->wnd);
3210            }
3211    
3212          sw->state = state;          sw->state = state;
3213    
3214          switch (state)          switch (state)

Legend:
Removed from v.1123  
changed lines
  Added in v.1132

  ViewVC Help
Powered by ViewVC 1.1.26