/[rdesktop]/sourceforge.net/trunk/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/trunk/rdesktop/xwin.c

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

revision 1417 by jsorg71, Thu Aug 30 04:47:36 2007 UTC revision 1453 by astrand, Fri Mar 14 07:39:38 2008 UTC
# Line 2028  xwin_process_events(void) Line 2028  xwin_process_events(void)
2028                                  /* the window manager told us to quit */                                  /* the window manager told us to quit */
2029                                  if ((xevent.xclient.message_type == g_protocol_atom)                                  if ((xevent.xclient.message_type == g_protocol_atom)
2030                                      && ((Atom) xevent.xclient.data.l[0] == g_kill_atom))                                      && ((Atom) xevent.xclient.data.l[0] == g_kill_atom))
2031                                          /* Quit */                                  {
2032                                          return 0;                                          /* When killing a seamless window, close the window on the
2033                                               serverside instead of terminating rdesktop */
2034                                            sw = sw_get_window_by_wnd(xevent.xclient.window);
2035                                            if (!sw)
2036                                                    /* Otherwise, quit */
2037                                                    return 0;
2038                                            /* send seamless destroy process message */
2039                                            seamless_send_destroy(sw->id);
2040                                    }
2041                                  break;                                  break;
2042    
2043                          case KeyPress:                          case KeyPress:
# Line 3452  ui_seamless_create_window(unsigned long Line 3460  ui_seamless_create_window(unsigned long
3460                  ewmh_set_window_modal(wnd);                  ewmh_set_window_modal(wnd);
3461          }          }
3462    
3463            if (flags & SEAMLESSRDP_CREATE_TOPMOST)
3464            {
3465                    /* Make window always-on-top */
3466                    ewmh_set_window_above(wnd);
3467            }
3468    
3469          /* FIXME: Support for Input Context:s */          /* FIXME: Support for Input Context:s */
3470    
3471          get_input_mask(&input_mask);          get_input_mask(&input_mask);
# Line 3459  ui_seamless_create_window(unsigned long Line 3473  ui_seamless_create_window(unsigned long
3473    
3474          XSelectInput(g_display, wnd, input_mask);          XSelectInput(g_display, wnd, input_mask);
3475    
3476          /* handle the WM_DELETE_WINDOW protocol. FIXME: When killing a          /* handle the WM_DELETE_WINDOW protocol. */
            seamless window, we could try to close the window on the  
            serverside, instead of terminating rdesktop */  
3477          XSetWMProtocols(g_display, wnd, &g_kill_atom, 1);          XSetWMProtocols(g_display, wnd, &g_kill_atom, 1);
3478    
3479          sw = xmalloc(sizeof(seamless_window));          sw = xmalloc(sizeof(seamless_window));
# Line 3690  ui_seamless_restack_window(unsigned long Line 3702  ui_seamless_restack_window(unsigned long
3702                  sw_behind = sw_get_window_by_id(behind);                  sw_behind = sw_get_window_by_id(behind);
3703                  if (!sw_behind)                  if (!sw_behind)
3704                  {                  {
3705                          warning("ui_seamless_restack_window: No information for window 0x%lx\n",                          warning("ui_seamless_restack_window: No information for behind window 0x%lx\n", behind);
                                 behind);  
3706                          return;                          return;
3707                  }                  }
3708    
3709                  wnds[1] = sw_behind->wnd;                  wnds[1] = sw->wnd;
3710                  wnds[0] = sw->wnd;                  wnds[0] = sw_behind->wnd;
3711    
3712                  XRestackWindows(g_display, wnds, 2);                  XRestackWindows(g_display, wnds, 2);
3713          }          }
# Line 3706  ui_seamless_restack_window(unsigned long Line 3717  ui_seamless_restack_window(unsigned long
3717          }          }
3718    
3719          sw_restack_window(sw, behind);          sw_restack_window(sw, behind);
3720    
3721            if (flags & SEAMLESSRDP_CREATE_TOPMOST)
3722            {
3723                    /* Make window always-on-top */
3724                    ewmh_set_window_above(sw->wnd);
3725            }
3726  }  }
3727    
3728    

Legend:
Removed from v.1417  
changed lines
  Added in v.1453

  ViewVC Help
Powered by ViewVC 1.1.26