/*
  * Call this method under AWTLock.
  * The lock should be acquired untill all operations with XSizeHints are completed.
  */
 public XSizeHints getHints() {
   if (hints == null) {
     long p_hints = XlibWrapper.XAllocSizeHints();
     hints = new XSizeHints(p_hints);
     //              XlibWrapper.XGetWMNormalHints(XToolkit.getDisplay(), getWindow(), p_hints,
     // XlibWrapper.larg1);
     // TODO: Shouldn't we listen for WM updates on this property?
   }
   return hints;
 }
Beispiel #2
0
 public Dimension getMinimumSize() {
   if (isXEmbedActive()) {
     XToolkit.awtLock();
     try {
       long p_hints = XlibWrapper.XAllocSizeHints();
       XSizeHints hints = new XSizeHints(p_hints);
       XlibWrapper.XGetWMNormalHints(
           XToolkit.getDisplay(), xembed.handle, p_hints, XlibWrapper.larg1);
       Dimension res = new Dimension(hints.get_min_width(), hints.get_min_height());
       XlibWrapper.XFree(p_hints);
       return res;
     } finally {
       XToolkit.awtUnlock();
     }
   } else {
     return super.getMinimumSize();
   }
 }