Opened 15 years ago
Closed 13 years ago
#1189 closed enhancement (invalid)
[cla] TaskBarItem improvement
Reported by: | Owned by: | dante | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Dojox | Version: | 0.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
If you click on the taskbar "button", the window runs the toggle effect even if the window is already showing.
Fix:
Index: D:/xhosts/dentab.ro.my/www/js/dojo_nightly/src/widget/TaskBar.js =================================================================== --- D:/xhosts/dentab.ro.my/www/js/dojo_nightly/src/widget/TaskBar.js (revision 5011) +++ D:/xhosts/dentab.ro.my/www/js/dojo_nightly/src/widget/TaskBar.js (working copy) @@ -36,7 +36,10 @@ }, onClick: function() { - this.window.show(); + if (!this.window.isShowing()) + { + this.window.show(); + } } });
Change History (7)
comment:1 Changed 15 years ago by
Priority: | normal → high |
---|
comment:2 Changed 15 years ago by
Milestone: | 0.4 → 0.5 |
---|---|
Priority: | high → normal |
Again, we need the CLA. Also note that your change will be a bit strange if you click the taskbar item for a maximized window. (In Microsoft Windows, clicking the taskbar twice on a maximized window will minimize then maximize, but your code will minimize the window but then display it in normal mode.)
comment:3 Changed 15 years ago by
Bill, Andrei,
Why not implement the fix like this? It's simple and it will retain state, including maximized. It will not handle the double click issue obviously, as that is a different event.
onClick: function() { if (this.window.isHidden) this.window.show(); else this.window.hide(); }
v/r, -Chris Newbill
comment:4 Changed 15 years ago by
This is a better implementation, but it requires a change to FloatingPane?.js also (addition of hasFocus attribute).
It emulates the behavior of the windows start bar with the exception that in FloatingPane?.js, if an item loses focus we'll attempt to focus the next highest z-order if available. I'll post these changes in #1184.
It's a judgment call really, because unless the widget implements the methods restoreWindow, bringToTop, and minimizeWindow, you'll be limited to adding FloatingPanes? (and derived classes) to the TaskBar?. Which seems okay to me, but I'm not sure if that's the design goals.
TaskBarItem?.onClick
onClick: function() { // first check if it's hidden if (this.window.isHidden) this.window.restoreWindow(); else // now check if it's in focus if (!this.window.hasFocus) this.window.bringToTop(); else this.window.minimizeWindow(); }
comment:5 Changed 14 years ago by
Component: | Widgets → Dojox |
---|---|
Milestone: | 0.9 |
comment:6 Changed 13 years ago by
Milestone: | → 1.2 |
---|---|
Owner: | changed from bill to dante |
Summary: | TaskBarItem improvement → [cla] TaskBarItem improvement |
Decide if this is relevant in the 1.0-realm. CLA on file for Chris Newbill.
comment:7 Changed 13 years ago by
Description: | modified (diff) |
---|---|
Milestone: | 1.2 |
Resolution: | → invalid |
Status: | new → closed |
marking as 'invalid' only because the current state of web-desktop UI is poor in dojox FloatingPane?, and when(if) re factored, this will be duly noted. The "taskbar" of 1.0 is a poorly implemented experimental component called "Dock" I hope to deprecate. I do suggest psychef and whomever working out a solid api for this kind of thing (dojox forums, I proposed dojox.desktop ... )
I would like to "correct"/enhance my fix.
this.window.show only shows the window, doesn't set the windowState. Plus, the taskbar should react when the window isShowing by minimizing it.
Correct Fix: