[uim-commit] r948 - trunk/xim

ekato at freedesktop.org ekato at freedesktop.org
Thu Jul 7 19:12:30 EST 2005


Author: ekato
Date: 2005-07-07 02:11:51 -0700 (Thu, 07 Jul 2005)
New Revision: 948

Modified:
   trunk/xim/xim.h
   trunk/xim/ximic.cpp
   trunk/xim/ximim.cpp
Log:
* xim/xim.h (class XimIM) : Add public member send_sync().
(class XimIC) : Add private member send_sync().
* xim/ximic.cpp (XimIC::extra_input) : Fix temporary broken
  extra_input facility.
(XimIC::send_sync) : New.
* xim/ximim.cpp (class XimIM_impl) : New public member
  send_sync().
(XimIM_impl::send_sync) : New.  Send XIM_SYNC.


Modified: trunk/xim/xim.h
===================================================================
--- trunk/xim/xim.h	2005-07-07 06:28:07 UTC (rev 947)
+++ trunk/xim/xim.h	2005-07-07 09:11:51 UTC (rev 948)
@@ -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: trunk/xim/ximic.cpp
===================================================================
--- trunk/xim/ximic.cpp	2005-07-07 06:28:07 UTC (rev 947)
+++ trunk/xim/ximic.cpp	2005-07-07 09:11:51 UTC (rev 948)
@@ -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: trunk/xim/ximim.cpp
===================================================================
--- trunk/xim/ximim.cpp	2005-07-07 06:28:07 UTC (rev 947)
+++ trunk/xim/ximim.cpp	2005-07-07 09:11:51 UTC (rev 948)
@@ -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