Loosing focus when windows open or close Thread last updated on 2007-11-30 12:59:45

Posted by member 387361 on 2007-11-27 21:36:07

I've created my own minimalist theme with just a small row down the bottom of the screen for the taskbar, date/time, command box, system tray and an RSS feed.

I have them squashed to the left and slide further to the right as needed to fit extra icons in the taskbar or the system tray.

Unfortunately when this slide occurs, focus shifts to the Litestep command box instead of staying on the new window or returning to a previous window when one is closed.

I'll 99% certain I don't have any "focus-stealing" code within my theme config, but can anyone suggest what might be the cause?

Modules being used (copied straight from themes.rc):
*NetLoadModule jdesk-0.73
*NetLoadModule xstatsclass-1.0
*NetLoadModule popup2-2.1.4
*NetLoadModule xtray-2.0.2
*NetLoadModule xtaskbar-2.0.5
*NetLoadModule lsxcommand-2.0.1
*NetLoadModule xlabel-4.1.1
*netloadmodule rssreader-1.1

If you need further information, I'm willing to make parts/all of the config available online.

Posted by member 31 on 2007-11-29 13:24:21 link

at least paste the .rc syntax for the sliding effect

Posted by member 387361 on 2007-11-29 18:09:12 link

When a new window appears:
xtaskbaronadd !execute [!labelmoveby nodeusage $xtaskbarbuttonmaxwidth$ 0 $slidestep$ $slidetime$][!xtraymoveby $xtaskbarbuttonmaxwidth$ 0 $slidestep$ $slidetime$][!commandmoveby $xtaskbarbuttonmaxwidth$ 0 $slidestep$ $slidetime$][!labelmoveby TimeLabel $xtaskbarbuttonmaxwidth$ 0 $slidestep$ $slidetime$]

When a window is removed:
xtaskbaronremove !execute [!labelmoveby TimeLabel $-xtaskbarbuttonmaxwidth$ 0 $slidestep$ $slidetime$][!commandmoveby $-xtaskbarbuttonmaxwidth$ 0 $slidestep$ $slidetime$][!xtraymoveby $-xtaskbarbuttonmaxwidth$ 0 $slidestep$ $slidetime$][!labelmoveby nodeusage $-xtaskbarbuttonmaxwidth$ 0 $slidestep$ $slidetime$]

$slidestep$ and $slidetime$ are variables I created just before those two lines so that I can easily vary how fast it slides along.

When at item is added to the taskbar, "nodeusage" (fed from RSSreader for my internet usage) is slid first, then the xtray box, the lsxcommand box and then the time label.
When at item is removed, it's the opposite order - time, lsxcommand, xtray and then "nodeusage".

The loss of focus occurs AFTER the sliding has completed.

Posted by member 31 on 2007-11-30 12:59:45 link

Does removing the !commandmoveby bang fix the issue? Try removing each !xxxmoveby bang, and see which one, if any is causing the problem, then track it down from there.