[uim-commit] r957 - branches/uim-0.4.7/xim
tkng at freedesktop.org
tkng at freedesktop.org
Sun Jul 10 03:53:33 EST 2005
Author: tkng
Date: 2005-07-09 10:53:30 -0700 (Sat, 09 Jul 2005)
New Revision: 957
Modified:
branches/uim-0.4.7/xim/xim.h
branches/uim-0.4.7/xim/ximic.cpp
branches/uim-0.4.7/xim/ximim.cpp
Log:
* xim/xim.h, xim/ximic.cpp, xim/ximim.cpp: Ported -r 948 from trunk.
Modified: branches/uim-0.4.7/xim/xim.h
===================================================================
--- branches/uim-0.4.7/xim/xim.h 2005-07-09 17:11:14 UTC (rev 956)
+++ branches/uim-0.4.7/xim/xim.h 2005-07-09 17:53:30 UTC (rev 957)
@@ -184,6 +184,7 @@
virtual void unset_ic_focus(int icid) = 0;
virtual void forward_event(RxPacket *) = 0;
virtual void send_sync_reply(int icid) = 0;
+ virtual void send_sync(int icid) = 0;
virtual XimIC *get_ic_by_id(int icid) = 0;
virtual void onSendPacket() = 0;
virtual void changeContext(const char *engine) = 0;
@@ -304,6 +305,7 @@
void send_key_event(XKeyEvent *k);
int lookup_style(unsigned long);
void set_ic_attr(int, C8 *, int );
+ void send_sync();
Connection *mConn;
// mConvdisp is 0 until getting enough icxatr. Need to delete
Modified: branches/uim-0.4.7/xim/ximic.cpp
===================================================================
--- branches/uim-0.4.7/xim/ximic.cpp 2005-07-09 17:11:14 UTC (rev 956)
+++ branches/uim-0.4.7/xim/ximic.cpp 2005-07-09 17:53:30 UTC (rev 957)
@@ -490,9 +490,16 @@
commit_string(s);
onSendPacket();
+ send_sync();
force_send_packet();
}
+void XimIC::send_sync() {
+
+ XimIM *im = get_im_by_id(mIMid);
+ im->send_sync(mICid);
+}
+
void XimIC::force_send_packet(void) {
(dynamic_cast<XConnection *>(mConn))->writeProc();
}
Modified: branches/uim-0.4.7/xim/ximim.cpp
===================================================================
--- branches/uim-0.4.7/xim/ximim.cpp 2005-07-09 17:11:14 UTC (rev 956)
+++ branches/uim-0.4.7/xim/ximim.cpp 2005-07-09 17:53:30 UTC (rev 957)
@@ -88,6 +88,7 @@
virtual void unset_ic_focus(int icid);
virtual void forward_event(RxPacket *);
virtual void send_sync_reply(int icid);
+ virtual void send_sync(int icid);
virtual XimIC *get_ic_by_id(int id);
virtual void onSendPacket();
virtual void changeContext(const char *);
@@ -363,6 +364,14 @@
mConn->push_packet(t);
}
+void XimIM_impl::send_sync(int icid)
+{
+ TxPacket *t = createTxPacket(XIM_SYNC, 0);
+ t->pushC16(mID);
+ t->pushC16(icid);
+ mConn->push_packet(t);
+}
+
void XimIM_impl::onSendPacket()
{
std::map<int, XimIC *>::iterator i;
More information about the uim-commit
mailing list