enable by default
authorHyoyoung Chang <hyoyoung.chang@samsung.com>
Thu, 16 Sep 2010 05:48:18 +0000 (14:48 +0900)
committerHyoyoung Chang <hyoyoung.chang@samsung.com>
Thu, 16 Sep 2010 05:48:18 +0000 (14:48 +0900)
debian/cbhm.postinst
debian/changelog
src/clipdrawer.c
src/xcnphandler.c
src/xcnphandler.h

index 5bcff8c..8ab65f6 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
 
-#ln -s /etc/init.d/cbhm /etc/rc.d/rc3.d/S95cbhm
+ln -s /etc/init.d/cbhm /etc/rc.d/rc3.d/S95cbhm
 
 sync
index 2038709..a523540 100644 (file)
@@ -1,3 +1,12 @@
+cbhm (0.1.0-11) unstable; urgency=low
+
+  * case of inhouse package
+  * Git: 165.213.180.234:/git/slp/pkgs/cbhm
+  * Tag: cbhm_0.1.0-11
+  * enable by default
+
+ -- Hyoyoung Chang <hyoyoung.chang@samsung.com>  Thu, 16 Sep 2010 14:46:41 +0900
+
 cbhm (0.1.0-10) unstable; urgency=low
 
   * case of inhouse package
index a3cf06d..f996458 100644 (file)
@@ -33,7 +33,7 @@ _image_click(void *data, Evas_Object *obj, void *event_info)
        p = malloc(len + 10);
        snprintf(p,len+10,"file:///%s/%s",dir,file);
 
-       elm_selection_set(1,data,2,p);
+       elm_selection_set(/*secondary*/1,data,/*image*/2,p);
 }
 
 static void _list_click( void *data, Evas_Object *obj, void *event_info )
@@ -58,6 +58,8 @@ static void _list_click( void *data, Evas_Object *obj, void *event_info )
        snprintf(p, clen+1, "%s", cpdata);
        elm_selection_set(1, obj, /*mark up*/1, p);
 
+//     set_selection_secondary_data(p);
+
        clipdrawer_lower_view(ad);
 }
 
index b9050e4..4d40977 100755 (executable)
@@ -359,7 +359,7 @@ static int _xsel_request_cb(void *data, int ev_type, void *event)
 
        if (ev->selection != atomClipboard)
                return TRUE;
-       
+
        DTRACE("SelectionRequest\n");
 
        processing_selection_request(ev);
@@ -490,3 +490,43 @@ static int _xclient_msg_cb(void *data, int ev_type, void *event)
        return TRUE;
 }
 
+static Ecore_X_Window get_selection_secondary_target_win()
+{
+       Atom actual_type;
+       int actual_format;
+       unsigned long nitems, bytes_after;
+       unsigned char *prop_return = NULL;
+       Atom atomCbhmXTarget = XInternAtom(g_disp, "CBHM_XTARGET", False);
+       static Ecore_X_Window xtarget = None;
+       if (xtarget != None)
+               return xtarget;
+
+       if(Success == 
+          XGetWindowProperty(g_disp, DefaultRootWindow(g_disp), atomCbhmXTarget, 
+                                                 0, sizeof(Ecore_X_Window), False, XA_WINDOW, 
+                                                 &actual_type, &actual_format, &nitems, &bytes_after, &prop_return) && 
+          prop_return)
+       {
+               xtarget = *(Ecore_X_Window*)prop_return;
+               XFree(prop_return);
+               fprintf(stderr, "## find clipboard secondary target at root\n");
+       }
+       return xtarget;
+}
+
+int set_selection_secondary_data(char *sdata)
+{
+//     elm_selection_set(1, obj, /*mark up*/1, p);
+       Ecore_X_Window setwin = get_selection_secondary_target_win();
+       if (setwin == None)
+               return 0;
+
+       if (sdata == NULL)
+               return 0;
+
+       int slen = strlen(sdata);
+
+       fprintf(stderr, "## cbhm xwin = 0x%x, d = %s\n", setwin, sdata);
+
+       ecore_x_selection_secondary_set(setwin, sdata, slen);
+}
index 9ea42ae..eed721a 100755 (executable)
@@ -34,6 +34,8 @@ static int _xsel_clear_cb(void *data, int ev_type, void *event);
 static int _xsel_request_cb(void *data, int ev_type, void *event);
 static int _xsel_notify_cb(void *data, int ev_type, void *event);
 static int _xclient_msg_cb(void *data, int ev_type, void *event);
+static Ecore_X_Window get_selection_secondary_target_win();
+int set_selection_secondary_data(char *sdata);
        
 #define ATOM_CLIPBOARD_NAME "CLIPBOARD"
 #define ATOM_CLIPBOARD_MANAGER_NAME "CLIPBOARD_MANAGER"