Ejemplo n.º 1
0
 protected void requestFocusImpl(final boolean force) {
   runWithLockedDisplayDevice(
       new DisplayImpl.DisplayRunnable<Object>() {
         public Object run(long dpy) {
           requestFocus0(dpy, getWindowHandle(), force);
           return null;
         }
       });
 }
Ejemplo n.º 2
0
 @Override
 protected void warpPointerImpl(final int x, final int y) {
   runWithLockedDisplayDevice(
       new DisplayImpl.DisplayRunnable<Object>() {
         public Object run(long dpy) {
           warpPointer0(dpy, getWindowHandle(), x, y);
           return null;
         }
       });
 }
Ejemplo n.º 3
0
 @Override
 protected void setTitleImpl(final String title) {
   runWithLockedDisplayDevice(
       new DisplayImpl.DisplayRunnable<Object>() {
         public Object run(long dpy) {
           setTitle0(dpy, getWindowHandle(), title);
           return null;
         }
       });
 }
Ejemplo n.º 4
0
  protected boolean reconfigureWindowImpl(
      final int x, final int y, final int width, final int height, final int flags) {
    if (DEBUG_IMPLEMENTATION) {
      System.err.println(
          "X11Window reconfig: "
              + x
              + "/"
              + y
              + " "
              + width
              + "x"
              + height
              + ", "
              + getReconfigureFlagsAsString(null, flags));
    }
    final int _x, _y;
    if (0 == (FLAG_IS_UNDECORATED & flags)) {
      final InsetsImmutable i = getInsets();

      // client position -> top-level window position
      _x = x - i.getLeftWidth();
      _y = y - i.getTopHeight();
    } else {
      _x = x;
      _y = y;
    }
    final DisplayDriver display = (DisplayDriver) getScreen().getDisplay();
    runWithLockedDisplayDevice(
        new DisplayImpl.DisplayRunnable<Object>() {
          public Object run(long dpy) {
            reconfigureWindow0(
                dpy,
                getScreenIndex(),
                getParentWindowHandle(),
                getWindowHandle(),
                display.getWindowDeleteAtom(),
                _x,
                _y,
                width,
                height,
                flags);
            return null;
          }
        });
    return true;
  }