Xfce Forum

Sub domains

You are not logged in.

#1 2021-06-10 22:17:35

Registered: 2021-06-10
Posts: 1

Always on Top Button for Window Title - Feature Request / My Mod

The Point

I think an optional "Always on Top" button for the title bar would be a nice addition to xfwm.


I work for a small company doing all sorts of jobs (web and software dev, order processing, stock ordering, procurement, etc...) and when our computers ran Windows, I had written a little Visual Basic program that was basically a sticky note on your desktop. It let me make notes then hit a button to pin (what I call setting the window to "Always on Top") the note so I could do what ever I needed to do. It made my work flow so much easier as I didn't need to keep switching between windows when I had so do things such as copying address lines into individual fields or working though a list of sku's.

When Windows 7 hit it's end of life we decided to start using linux. The switch all went smoothly and every aspect of my workflow improved, other than pinning my notes. Right clicking to get the menu and then the little thinking time to decided what menu item to click to set "Always on Top" or "Same as Other Windows" just gets me out of my flow and I wanted my "pin" button back.

The Mod

I never use the "Stick" button so I altered the functionality of it to toggle "Always on Top" instead. A few times I have gone back and looked at doing it properly by adding a new button, but I'm just not familiar enough with the language and source to get it done.

The code for my mod is as follows;

In src/client.h add;

	void                     clientToggleAbove                      (Client *);

In src/client.c add;

clientToggleAbove (Client *c)
    g_return_if_fail (c != NULL);
    TRACE ("client \"%s\" (0x%lx)", c->name, c->window);

    if (FLAG_TEST (c->flags, CLIENT_FLAG_ABOVE))
        clientSetLayerNormal (c);
        clientToggleLayerAbove (c);

Then edit;

            case STICK_BUTTON:
//                clientToggleSticky (c, TRUE);
                clientToggleAbove (c);
So There You Go

Hopefully a developer feels the "Always on Top" button is worth adding, but if not, hopefully at least someone finds my mod useful.


Board footer

Powered by FluxBB