{
#if OS(TIZEN)
// 1. Get CBHM Ecore_X_Window.
- Ecore_X_Window cbhmXWindow = 0;
+ Ecore_X_Window xWindow = 0;
Ecore_X_Atom xAtom;
unsigned char* data = 0;
int numberOfWindow = 0;
return 0;
int result = ecore_x_window_prop_property_get(0, xAtom, XA_WINDOW, 0, &data, &numberOfWindow);
if (result && numberOfWindow)
- memcpy(&cbhmXWindow, data, sizeof(Ecore_X_Window));
+ memcpy(&xWindow, data, sizeof(Ecore_X_Window));
if (data)
free(data);
- if (!cbhmXWindow)
+ if (!xWindow)
return 0;
- // 2. Send Message to get number of clipboard items.
- xAtom = ecore_x_atom_get("CBHM_MSG");
- if (!xAtom)
- return 0;
- Ecore_X_Window xWindow = ecore_evas_software_x11_window_get(ecore_evas_ecore_evas_get(evas_object_evas_get(object)));
- Display* display = static_cast<Display*>(ecore_x_display_get());
- XClientMessageEvent messageEvent;
- memset(&messageEvent, 0, sizeof(messageEvent));
- messageEvent.type = ClientMessage;
- messageEvent.display = display;
- messageEvent.window = xWindow;
- messageEvent.message_type = xAtom;
- messageEvent.format = 8;
- snprintf(messageEvent.data.b, 20, "%s", "get count");
- XSendEvent(display, cbhmXWindow, False, NoEventMask, reinterpret_cast<XEvent*>(&messageEvent));
ecore_x_sync();
- // 3. Get number of clipboard items.
+ // 2. Get number of clipboard items.
xAtom = ecore_x_atom_get("CBHM_cCOUNT");
if (!xAtom)
return 0;
+ Display* display = static_cast<Display*>(ecore_x_display_get());
int format;
long unsigned int numberOfItems = 0;
long unsigned int bytes = 0;