[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdebase/nsplugins/viewer
From:       George Staikos <staikos () kde ! org>
Date:       2005-02-27 20:50:25
Message-ID: 20050227205025.E8719148A2 () office ! kde ! org
[Download RAW message or body]

CVS commit by staikos: 

fix sizing for the extremely intolerant acroread plugin
BUG: 100398


  M +9 -1      nsplugin.cpp   1.124
  M +1 -0      nsplugin.h   1.47


--- kdebase/nsplugins/viewer/nsplugin.cpp  #1.123:1.124
@@ -589,4 +589,5 @@ NSPluginInstance::NSPluginInstance(NPP p
 {
     Q_UNUSED(embed);
+   _firstResize = true;
    _visible = false;
    _npp = privateData;
@@ -967,4 +968,7 @@ void NSPluginInstance::resizePlugin(int 
    _height = h;
 
+   XResizeWindow(qt_xdisplay(), XtWindow(_form), w, h);
+   XResizeWindow(qt_xdisplay(), XtWindow(_toplevel), w, h);
+
    Arg args[7];
    Cardinal nargs = 0;
@@ -976,9 +980,13 @@ void NSPluginInstance::resizePlugin(int 
    XtSetArg(args[nargs], XtNborderWidth, 0); nargs++;
 
+   XtSetValues(_toplevel, args, nargs);
    XtSetValues(_form, args, nargs);
 
    resizeWidgets(XtWindow(_form), _width, _height);
 
+   if (_firstResize) {
+      _firstResize = false;
    setWindow();
+   }
 
    kdDebug(1431) << "<- NSPluginInstance::resizePlugin" << endl;

--- kdebase/nsplugins/viewer/nsplugin.h  #1.46:1.47
@@ -219,4 +219,5 @@ private:
   bool _destroyed;
   bool _visible;
+  bool _firstResize;
   void addTempFile(KTempFile *tmpFile);
   QPtrList<KTempFile> _tempFiles;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic