[prev in list] [next in list] [prev in thread] [next in thread]
List: konsole-devel
Subject: [Konsole-devel] [PATCH] konsole XIM position
From: Takumi ASAKI <asataku () osk3 ! 3web ! ne ! jp>
Date: 2002-02-21 13:48:04
[Download RAW message or body]
konsole doesn't change XIM position.
Here is patch to fix it.
It works well for me.
Please review it.
--
Che Che - Bye Bye
From: Takumi ASAKI <asataku@osk3.3web.ne.jp>
URL: http://www3.osk.3web.ne.jp/~asataku/
["kdebase-3.0-cvs-konsole-XIM-position-20020221.diff" (text/x-diff)]
diff -ur /home/asaki/src/KDE/kde/kdebase/konsole/konsole/TEWidget.cpp \
kdebase/konsole/konsole/TEWidget.cpp
--- /home/asaki/src/KDE/kde/kdebase/konsole/konsole/TEWidget.cpp Thu Feb 21 22:20:01 \
2002
+++ kdebase/konsole/konsole/TEWidget.cpp Thu Feb 21 22:36:03 2002
@@ -414,6 +414,22 @@
}
/*!
+ Set XIM Position
+*/
+void TEWidget::setCursorPos(const int curx, const int cury)
+{
+ QPoint tL = contentsRect().topLeft();
+ int tLx = tL.x();
+ int tLy = tL.y();
+
+ int xpos, ypos;
+ ypos = bY + tLy + font_h*(cury-1) + font_a;
+ xpos = bX + tLx + font_w*curx;
+ setMicroFocusHint(xpos, ypos, 0, font_h);
+ // fprintf(stderr, "x/y = %d/%d\txpos/ypos = %d/%d\n", curx, cury, xpos, ypos);
+}
+
+/*!
The image can only be set completely.
The size of the new image may or may not match the size of the widget.
diff -ur /home/asaki/src/KDE/kde/kdebase/konsole/konsole/TEWidget.h \
kdebase/konsole/konsole/TEWidget.h
--- /home/asaki/src/KDE/kde/kdebase/konsole/konsole/TEWidget.h Sat Jan 12 00:37:51 \
2002
+++ kdebase/konsole/konsole/TEWidget.h Thu Feb 21 22:33:54 2002
@@ -64,6 +64,8 @@
void setImage(const ca* const newimg, int lines, int columns);
void setLineWrapped(QBitArray line_wrapped) { m_line_wrapped=line_wrapped; }
+ void setCursorPos(const int curx, const int cury);
+
int Lines() { return lines; }
int Columns() { return columns; }
diff -ur /home/asaki/src/KDE/kde/kdebase/konsole/konsole/TEmulation.cpp \
kdebase/konsole/konsole/TEmulation.cpp
--- /home/asaki/src/KDE/kde/kdebase/konsole/konsole/TEmulation.cpp Sat Jan 12 \
00:37:51 2002
+++ kdebase/konsole/konsole/TEmulation.cpp Thu Feb 21 22:33:28 2002
@@ -382,6 +382,7 @@
gui->setImage(image,
scr->getLines(),
scr->getColumns()); // actual refresh
+ gui->setCursorPos(scr->getCursorX(), scr->getCursorY()); // set XIM position
free(image);
//FIXME: check that we do not trigger other draw event here.
gui->setLineWrapped( scr->getCookedLineWrapped() );
_______________________________________________
konsole-devel mailing list
konsole-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/konsole-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic