Add support for copying to clipboard (based on patch by Dana Jansens).
[dana/urxvt.git] / src / rxvttoolkit.h
index 487ded4..4f91564 100644 (file)
@@ -61,6 +61,7 @@ enum {
   XA_NET_WM_NAME,
   XA_NET_WM_ICON_NAME,
   XA_NET_WM_PING,
+  XA_NET_WM_ICON,
 #endif
 #if USE_XIM
   XA_WM_LOCALE_NAME,
@@ -236,6 +237,7 @@ struct rxvt_display : refcounted
   int       screen;
   Window    root;
   rxvt_term *selection_owner;
+  rxvt_term *clipboard_owner;
   Atom      xa[NUM_XA];
   bool      is_local;
 #ifdef POINTER_BLANK
@@ -254,7 +256,7 @@ struct rxvt_display : refcounted
   }
 
   Atom atom (const char *name);
-  void set_selection_owner (rxvt_term *owner);
+  void set_selection_owner (rxvt_term *owner, bool clipboard);
 
   void reg (xevent_watcher *w);
   void unreg (xevent_watcher *w);
@@ -269,7 +271,8 @@ struct rxvt_display : refcounted
 };
 
 #ifdef USE_XIM
-struct im_watcher : rxvt_watcher, callback<void (void)> {
+struct im_watcher : rxvt_watcher, callback<void (void)>
+{
   void start (rxvt_display *display)
   {
     display->reg (this);
@@ -334,8 +337,7 @@ struct rxvt_color
   bool is_opaque () const
   {
 #if XFT
-    //TODO: only supports 24 bit truecolour
-    return c.color.alpha < 0xff00;
+    return c.color.alpha == rgba::MAX_CC;
 #else
     return 1;
 #endif