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

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

View File

@ -3572,6 +3572,8 @@ TreeStyleTabBrowser.prototype = {
this.mTabBrowser.mPanelContainer.addEventListener('scroll', this, true); this.mTabBrowser.mPanelContainer.addEventListener('scroll', this, true);
if (this.shouldListenMouseMove) if (this.shouldListenMouseMove)
this.startListenMouseMove(); this.startListenMouseMove();
if (this.mTabBrowser == gBrowser && this.shouldListenKeyEvents)
TreeStyleTabService.startListenKeyEvents();
this.clearTabbarCanvas(); this.clearTabbarCanvas();
this.updateTabbarTransparency(); this.updateTabbarTransparency();
@ -3595,6 +3597,8 @@ TreeStyleTabBrowser.prototype = {
this.mTabBrowser.removeEventListener('load', this, true); this.mTabBrowser.removeEventListener('load', this, true);
this.mTabBrowser.mPanelContainer.removeEventListener('scroll', this, true); this.mTabBrowser.mPanelContainer.removeEventListener('scroll', this, true);
this.endListenMouseMove(); this.endListenMouseMove();
if (this.mTabBrowser == gBrowser)
TreeStyleTabService.endListenKeyEvents();
this.clearTabbarCanvas(); this.clearTabbarCanvas();
this.updateTabbarTransparency(); this.updateTabbarTransparency();
@ -3623,6 +3627,7 @@ TreeStyleTabBrowser.prototype = {
{ {
return this.getTreePref('tabbar.autoShow.mousemove') || 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'); this.getTreePref('tabbar.autoShow.feedback');
}, },