フルスクリーンモードになる時にショートカットでタブバーが表示されない問題を修正

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@3952 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2009-03-29 19:28:19 +00:00
parent d0a2c3b633
commit 8e480a19d9
2 changed files with 16 additions and 11 deletions

View File

@ -1659,8 +1659,6 @@ catch(e) {
sv.hideTabbar();
},
keyEventListening : false,
startListenKeyEvents : function()
{
if (this.keyEventListening) return;
@ -1669,8 +1667,7 @@ catch(e) {
window.addEventListener('keypress', this, true);
this.keyEventListening = true;
},
endListenKeyEvents : function()
endListenKeyEvents : function()
{
if (!this.keyEventListening) return;
window.removeEventListener('keydown', this, true);
@ -1678,6 +1675,13 @@ catch(e) {
window.removeEventListener('keypress', this, true);
this.keyEventListening = false;
},
keyEventListening : false,
get shouldListenKeyEvents()
{
return this.getTreePref('tabbar.autoShow.accelKeyDown') ||
this.getTreePref('tabbar.autoShow.tabSwitch') ||
this.getTreePref('tabbar.autoShow.feedback');
},
onTabbarResized : function(aEvent)
{
@ -2072,11 +2076,7 @@ catch(e) {
case 'extensions.treestyletab.tabbar.autoShow.feedback':
if (
this.getTreePref('tabbar.autoHide.mode') &&
(
this.getTreePref('tabbar.autoShow.accelKeyDown') ||
this.getTreePref('tabbar.autoShow.tabSwitch') ||
this.getTreePref('tabbar.autoShow.feedback')
)
this.shouldListenKeyEvents
) {
this.startListenKeyEvents();
}

View File

@ -3572,6 +3572,8 @@ TreeStyleTabBrowser.prototype = {
this.mTabBrowser.mPanelContainer.addEventListener('scroll', this, true);
if (this.shouldListenMouseMove)
this.startListenMouseMove();
if (this.mTabBrowser == gBrowser && this.shouldListenKeyEvents)
TreeStyleTabService.startListenKeyEvents();
this.clearTabbarCanvas();
this.updateTabbarTransparency();
@ -3594,7 +3596,9 @@ TreeStyleTabBrowser.prototype = {
this.mTabBrowser.removeEventListener('resize', this, true);
this.mTabBrowser.removeEventListener('load', this, true);
this.mTabBrowser.mPanelContainer.removeEventListener('scroll', this, true);
this.endListenMouseMove();
this.endListenMouseMove();
if (this.mTabBrowser == gBrowser)
TreeStyleTabService.endListenKeyEvents();
this.clearTabbarCanvas();
this.updateTabbarTransparency();
@ -3622,7 +3626,8 @@ TreeStyleTabBrowser.prototype = {
get shouldListenMouseMove()
{
return this.getTreePref('tabbar.autoShow.mousemove') ||
this.getTreePref('tabbar.autoShow.accelKeyDown') ||
this.getTreePref('tabbar.autoShow.accelKeyDown') ||
this.getTreePref('tabbar.autoShow.tabSwitch') ||
this.getTreePref('tabbar.autoShow.feedback');
},