[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: Patch for KIllustrator and KWord (XIM)
From: Toshitaka Fujioka <toshitaka () kde ! gr ! jp>
Date: 2001-07-13 10:42:50
[Download RAW message or body]
On Friday 13 July 2001 00:04, David Faure wrote:
> On Thursday 12 July 2001 18:03, Toshitaka Fujioka wrote:
> > On Thursday 12 July 2001 20:08, David Faure wrote:
[snip]
> > >Doesn't it work as well if you set it in KWCanvas ?
> >
> > Hmm, Yes, it is possible. But, code increases and hard to understand.
> > It is the best to write in "KWTextFrameSet::drawCursor(...)".
> > Because, XIM must be always displayed by cursor position.
>
> I know. I was just saying that you might have chosen the wrong QWidget
> for calling setMicroFocusHint. My guess is that if you use KWCanvas instead
> of KWGUI, you won't need the +30, +20, and you won't get a bug (wrong
> offset) if the rulers are hidden.
> All the coordinates are relative to the KWCanvas scrollview, NOT to the
> KWGUI widget.
>
> (But of course, you should still call this from KWTextFrameSet::drawCursor,
> no doubt there !)
Oops! :o Sorry, You're 100% right. This was bad patch(KWord). :(
I remade patch. This patch completely works. ;)
Thank you.
--
Toshitaka Fujioka
http://www.kde.org The K Desktop Environment Project
fujioka@kde.org
http://www.kde.gr.jp Japan KDE User's Group
toshitaka@kde.gr.jp
-- We offer the best Desktop Environment to you. (This is my goal. ;-)) --
["koffice-kword-xim-20010713.diff" (text/x-diff)]
diff -ur koffice.orig/kword/kwcanvas.cc koffice/kword/kwcanvas.cc
--- koffice.orig/kword/kwcanvas.cc Fri Jul 13 19:16:32 2001
+++ koffice/kword/kwcanvas.cc Fri Jul 13 19:24:34 2001
@@ -2080,4 +2080,9 @@
}
#endif
+void KWCanvas::setXimPosition( int x, int y, int w, int h )
+{
+ QWidget::setMicroFocusHint( x - contentsX(), y - contentsY(), w, h );
+}
+
#include "kwcanvas.moc"
diff -ur koffice.orig/kword/kwcanvas.h koffice/kword/kwcanvas.h
--- koffice.orig/kword/kwcanvas.h Fri Jul 13 19:16:32 2001
+++ koffice/kword/kwcanvas.h Fri Jul 13 19:25:03 2001
@@ -159,6 +159,8 @@
void emitFrameSelectedChanged();
+ void setXimPosition( int x, int y, int w, int h );
+
protected:
void applyGrid( KoPoint &p );
void applyAspectRatio( double ratio, KoRect& insRect );
diff -ur koffice.orig/kword/kwtextframeset.cc koffice/kword/kwtextframeset.cc
--- koffice.orig/kword/kwtextframeset.cc Fri Jul 13 19:16:32 2001
+++ koffice/kword/kwtextframeset.cc Fri Jul 13 19:25:57 2001
@@ -472,6 +472,9 @@
pix, cg, cursorVisible, cursor );
p->restore();
cursor->parag()->setChanged( wasChanged ); // Maybe we have more changes to draw!
+
+ //XIM Position
+ canvas->setXimPosition( cPoint.x(), cPoint.y(), 0, h );
}
}
m_currentDrawnCanvas = 0L;
_______________________________________________
Koffice-devel mailing list
Koffice-devel@master.kde.org
http://master.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic