/[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 332 by astrand, Tue Feb 18 13:51:43 2003 UTC revision 342 by astrand, Fri Mar 14 12:00:17 2003 UTC
# Line 59  static BOOL xserver_be; Line 59  static BOOL xserver_be;
59  static BOOL ownbackstore;  static BOOL ownbackstore;
60  static Pixmap backstore;  static Pixmap backstore;
61    
62    /* Moving in single app mode */
63    static BOOL moving_wnd;
64    static int move_x_offset = 0;
65    static int move_y_offset = 0;
66    
67  /* MWM decorations */  /* MWM decorations */
68  #define MWM_HINTS_DECORATIONS   (1L << 1)  #define MWM_HINTS_DECORATIONS   (1L << 1)
69  #define PROP_MOTIF_WM_HINTS_ELEMENTS    5  #define PROP_MOTIF_WM_HINTS_ELEMENTS    5
# Line 858  xwin_process_events(void) Line 863  xwin_process_events(void)
863                                  /* If win_button_size is nonzero, enable single app mode */                                  /* If win_button_size is nonzero, enable single app mode */
864                                  if (xevent.xbutton.y < win_button_size)                                  if (xevent.xbutton.y < win_button_size)
865                                  {                                  {
866                                          /* Check from right to left: */                                          /* Stop moving window when button is released, regardless of cursor position */
867                                            if (moving_wnd && (xevent.type == ButtonRelease))
868                                                    moving_wnd = False;
869    
870                                            /*  Check from right to left: */
871    
872                                          if (xevent.xbutton.x >= width - win_button_size)                                          if (xevent.xbutton.x >= width - win_button_size)
873                                          {                                          {
# Line 880  xwin_process_events(void) Line 889  xwin_process_events(void)
889                                                                 DefaultScreen(display));                                                                 DefaultScreen(display));
890                                                  break;                                                  break;
891                                          }                                          }
892                                            else if (xevent.xbutton.x <= win_button_size)
893                                            {
894                                                    /* The system menu. Ignore. */
895                                                    break;
896                                            }
897                                          else                                          else
898                                          {                                          {
899                                                  /* Ignore clicks to the rest of the border. This includes                                                  /* The title bar. */
900                                                     the system menu, but also inhibits double clicks on the                                                  if ((xevent.type == ButtonPress) && !fullscreen
901                                                     border itself. */                                                      && hide_decorations)
902                                                    {
903                                                            moving_wnd = True;
904                                                            move_x_offset = xevent.xbutton.x;
905                                                            move_y_offset = xevent.xbutton.y;
906                                                    }
907                                                  break;                                                  break;
908    
909                                          }                                          }
910                                  }                                  }
911    
# Line 894  xwin_process_events(void) Line 914  xwin_process_events(void)
914                                  break;                                  break;
915    
916                          case MotionNotify:                          case MotionNotify:
917                                    if (moving_wnd)
918                                    {
919                                            XMoveWindow(display, wnd,
920                                                        xevent.xmotion.x_root - move_x_offset,
921                                                        xevent.xmotion.y_root - move_y_offset);
922                                            break;
923                                    }
924    
925                                  if (fullscreen && !focused)                                  if (fullscreen && !focused)
926                                          XSetInputFocus(display, wnd, RevertToPointerRoot,                                          XSetInputFocus(display, wnd, RevertToPointerRoot,
927                                                         CurrentTime);                                                         CurrentTime);

Legend:
Removed from v.332  
changed lines
  Added in v.342

  ViewVC Help
Powered by ViewVC 1.1.26