On 02/15/2007 14:19, Aleksej Struk wrote:
> On Thu, Feb 15, 2007 at 11:05:47AM -0600, Ravenlock wrote:
>> Hello,
>>
>> Don't know if anyone would find this useful or not.  But here it is.
>>
>> After playing with borderless windows it occurred to me it would be nice 
>> to simply "Pin" a window down to the desktop background.
> 
> Well, for me it would be really useful. I also would like to have some
> borderless windows, like terminal, always on desktop.
> 

K.  Just to clarify, in case of misunderstanding.  You *can* presently 
accomplish this feat today.  It simply is a bit less convenient than I'd 
like.  The patch just makes it quick and easy to nail the window down.

>> The attached 
>> patch adds a border menu item that will:
>>
>>  - set the window to borderles
>>  - set stacking to below all
>>  - set skip winlist
>>
>> This has the net effect of pinning it down to the desktop background, 
>> and allowing it to stay there when you toggle the show desktop state.
>>
>> I find this useful, because I like to have a few items up borderless 
>> below everything, and wish that they not get swept away when showing the 
>> desktop.  I realize removing it from the winlist accomplishes that. 
>> However in order to do what I want to several windows I must select all 
>> these settings on each window. Seems a bit tedious.  So I created a 
>> border menu to automate it.  :)
>>
>> Gives that "Active Desktop" feeling that MS had/has going on.  You could 
>> add various (dare I say transparent) terminals showing whatever, maybe 
>> pin your calendar app down so its always there.  Just ideas.
>>
>> To complete the 'effect', next would be to remove that clients 
>> eligibility from the dropshadow module.  If this patch is accepted, I'll 
>> look into that.
>>
>> Note that once pinned you may use the alt+rmb combo to bring the menu up 
>> and select "unpin".
>>
>> -- 
>> Regards,
>> Ravenlock
> 
>> Index: e17/apps/e/src/bin/e_border.h
>> ===================================================================
>> RCS file: /var/cvs/e/e17/apps/e/src/bin/e_border.h,v
>> retrieving revision 1.153
>> diff -u -r1.153 e_border.h
>> --- e17/apps/e/src/bin/e_border.h    30 Nov 2006 17:42:41 -0000      1.153
>> +++ e17/apps/e/src/bin/e_border.h    15 Feb 2007 17:50:23 -0000
>> @@ -351,6 +351,7 @@
>>     unsigned int    need_maximize : 1;
>>     E_Maximize      maximized;
>>     unsigned int    borderless : 1;
>> +   unsigned int    pinned_to_desktop : 1;
>>     const char     *bordername;
>>  
>>     unsigned int    lock_user_location : 1; /*DONE*/
>> Index: e17/apps/e/src/bin/e_int_border_menu.c
>> ===================================================================
>> RCS file: /var/cvs/e/e17/apps/e/src/bin/e_int_border_menu.c,v
>> retrieving revision 1.55
>> diff -u -r1.55 e_int_border_menu.c
>> --- e17/apps/e/src/bin/e_int_border_menu.c   28 Dec 2006 14:05:07 -0000      
>> 1.55
>> +++ e17/apps/e/src/bin/e_int_border_menu.c   15 Feb 2007 17:50:23 -0000
>> @@ -27,6 +27,8 @@
>>  static void _e_border_menu_cb_skip_winlist(void *data, E_Menu *m, 
>> E_Menu_Item *mi);
>>  static void _e_border_menu_cb_sendto_pre(void *data, E_Menu *m, E_Menu_Item 
>> *mi);
>>  static void _e_border_menu_cb_sendto(void *data, E_Menu *m, E_Menu_Item 
>> *mi);
>> +static void _e_border_menu_cb_pin(void *data, E_Menu *m, E_Menu_Item *mi);
>> +static void _e_border_menu_cb_unpin(void *data, E_Menu *m, E_Menu_Item *mi);
>>  static void _e_border_menu_cb_raise(void *data, E_Menu *m, E_Menu_Item *mi);
>>  static void _e_border_menu_cb_lower(void *data, E_Menu *m, E_Menu_Item *mi);
>>  static void _e_border_menu_cb_state_pre(void *data, E_Menu *m, E_Menu_Item 
>> *mi);
>> @@ -182,6 +184,28 @@
>>                                "e/widgets/border/default/sendto");
>>       }
>>  
>> +   if (!bd->pinned_to_desktop)
>> +     {
>> +    mi = e_menu_item_new(m);
>> +    e_menu_item_label_set(mi, _("Pin to Desktop"));
>> +    e_menu_item_callback_set(mi, _e_border_menu_cb_pin, bd);
>> +        e_menu_item_icon_edje_set(mi,
>> +                              e_theme_edje_file_get("base/theme/borders",
>> +                                                    
>> "e/widgets/border/default/stick"),
>> +                              "e/widgets/border/default/stick");
>> +     }
>> +   
>> +   if (bd->pinned_to_desktop)
>> +     {
>> +    mi = e_menu_item_new(m);
>> +    e_menu_item_label_set(mi, _("Unpin from Desktop"));
>> +    e_menu_item_callback_set(mi, _e_border_menu_cb_unpin, bd);
>> +        e_menu_item_icon_edje_set(mi,
>> +                              e_theme_edje_file_get("base/theme/borders",
>> +                                                    
>> "e/widgets/border/default/stick"),
>> +                              "e/widgets/border/default/stick");
>> +     }
>> +
>>     mi = e_menu_item_new(m);
>>     e_menu_item_separator_set(mi, 1);
>>     
>> @@ -795,6 +819,54 @@
>>       }
>>  }
>>  
>> +static void
>> +_e_border_menu_cb_pin(void *data, E_Menu *m, E_Menu_Item *mi)
>> +{
>> +   E_Border *bd;
>> +
>> +   bd = e_object_data_get(E_OBJECT(m));
>> +   if (bd)
>> +     {
>> +    bd->pinned_to_desktop = 1;
>> +    bd->borderless = 1;
>> +    bd->user_skip_winlist = 1;
>> +    bd->client.netwm.state.stacking = E_STACKING_BELOW;
>> +
>> +        if (bd->layer != 50)
>> +          {
>> +         e_border_layer_set(bd, 50);
>> +         e_hints_window_stacking_set(bd, E_STACKING_BELOW);
>> +          }
>> +
>> +    bd->client.border.changed = 1;
>> +    bd->changed = 1;
>> +     }
>> +}
>> +
>> +static void
>> +_e_border_menu_cb_unpin(void *data, E_Menu *m, E_Menu_Item *mi)
>> +{
>> +   E_Border *bd;
>> +
>> +   bd = e_object_data_get(E_OBJECT(m));
>> +   if (bd)
>> +     {
>> +    bd->pinned_to_desktop = 0;
>> +    bd->borderless = 0;
>> +    bd->user_skip_winlist = 0;
>> +    bd->client.netwm.state.stacking = E_STACKING_NONE;
>> +
>> +        if (bd->layer != 100)
>> +          {
>> +         e_border_layer_set(bd, 100);
>> +         e_hints_window_stacking_set(bd, E_STACKING_NONE);
>> +          }
>> +
>> +    bd->client.border.changed = 1;
>> +    bd->changed = 1;
>> +     }
>> +}
>> +
>>  static void 
>>  _e_border_menu_cb_raise(void *data, E_Menu *m, E_Menu_Item *mi) 
>>  {
>>
>> ____________________________________________________________
>> FREE ONLINE PHOTOSHARING - Share your photos online with your friends and 
>> family!
>> Visit http://www.inbox.com/photosharing to find out more!
> 
>> -------------------------------------------------------------------------
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share your
>> opinions on IT & business topics through brief surveys-and earn cash
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> _______________________________________________
>> enlightenment-devel mailing list
>> enlightenment-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 
> 


-- 
Regards,
Ravenlock

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to