For some reasons, maybe an issue related to memory or crashes,
my firefox windows position on the windows deskbar changes,
unpurposely. I actually need a way either through greasemonkey, stylish
or an addon to make firefox detect where i put my windows
on the taskbar manually.
Otherwise, what happens is that the session firefox or sessionstore keeps,
will keep the position of windows after the incident happened &
a window moved to another place … . so even if i move that window
to the previous place & restart firefox, that window will reappear
where it was right after the incident & not when i moved it
back to its place … .
my actual stupid workaround:
restoring windows one by one using sessionstore…
because neither sessionstore or firefox session file detects where i reposition windows on the deskbar … .
You’ll have to use js-ctypes with an algo like this:
var preferredPosition = Services.prefs.getIntPref('extensions.myExt@jetpack.preferredPosition');
if (winTaskbar.items.length < preferredPosition) {
// put icon at last position
} else {
// put icon at preferredPosition
}
// set up some kind of listener, that listens to when items in taskbar are add/removed, and run this code
Now to get the number of items in taskbar its easy on WinXp and XP+.
However moving items around is hard on XP. As an API for doesn’t exist.
If you want to support XP we can do it, Ive been meaning to get around to it but never did yet.
What I did there was use EnumWindows with a delegate, and in the delegate I get the classes on the window with GetWindowLongPtr and there you will test for WS_EX_APPWINDOW. If it has that, the next issue is moving it around in the taskbar. That I don’t know how to do yet.
if i avoid the whole explanation… to resume it in a sentence…
my aim is to make sure when i move windows on the deskbar, firefox intercepts the position on the deskbar
with either a script, userstyle or addon, so if i restart the session, my manual reposition is remembered…
What’s a deskbar? Is that taskbar? Can you take screenshots and share?
If you right click on the icon in the taskbar for Firefox, and click on “Pin” it will stay in that position as long as all the items before it are always pinned. If they are not, then it will move to the spot after last pin, after you close out all your non-pinned programs.
“If you right click on the icon in the taskbar for Firefox, and click on
"Pin” it will stay in that position as long as all the items before it
are always pinned"
so true, but i don’t think anybody mentioned the desire to pin anything in the topic…
you seem to like to provide me all sorts of informations but always indirect replies
to the main topic i’ve explained twice.
and a deskbar is the right term that describes the windows main bottom bar
& that people started to call “taskbar” by mistake & everybody followed
believing a deskbar is a taskbar … .
the taskbar is the right section of a deskbar where you can’t move app’s icons
& where some apps put their icons with submenus to prevent populating the middle of the bar.
the deskbar is not the taskbar, & when ppl use the term deskbar, it’s to describe the middle section
of that bar in general, where firefox windows & other apps put icons, once the app is opened…
If I understood correctly, you’d like the position of individual Firefox windows (i.e. ungrouped taskbar items) to be remembered. As in, open a new firefox window, place it differently from the first window, remember both positions on restart. I do believe noitidart also misunderstood you on that point, but there’s no need to get defensive.
I’m also sure this is not possible via either a userscript or userstyle. An add-on is your only choice, and it can become a fairly complex add-on at that, as evidenced by noitidart’s research so far (from what I’m seeing, he’s also the best person at the moment to know if this is possible or not).
The code noitidart posted earlier was just a sample code of how it could be done; you’re not meant to actually use it anywhere, as that code does nothing by itself. Remember that you’re looking for an add-on that doesn’t exist (I think?), so the best way to start work on one, by yourself or someone else, is to figure out if/how it would work first.
By the way, it is called taskbar, it is not called that by mistake. Even if the terminology was different in the past (I don’t remember), right now that’s its name; the icons on the right are in the Notification area that is shown at the right edge of the taskbar: http://windows.microsoft.com/en-us/windows-8/use-the-taskbar