summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-12-16 21:30:22 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-12-17 09:11:38 +0000
commit016730421e5e58415170b464bf9d9ca47d6c3b4e (patch)
treebd0f6dff682cdbd45101f0982390640e9e1806ea
parent3d3e95d68557e93224ebdf75a2ac56acf42e7d44 (diff)
remove newly unused WB_NEEDSFOCUS and fragile FLOAT_FOCUSABLE
Change-Id: Idce03318fbc01039a6c0638879785607970993c0 Reviewed-on: https://gerrit.libreoffice.org/20746 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--include/tools/wintypes.hxx1
-rw-r--r--vcl/inc/salframe.hxx2
-rw-r--r--vcl/inc/unx/gtk/gtkframe.hxx3
-rw-r--r--vcl/osx/salframeview.mm2
-rw-r--r--vcl/source/window/brdwin.cxx2
-rw-r--r--vcl/source/window/window.cxx4
-rw-r--r--vcl/unx/gtk/gtksalframe.cxx11
-rw-r--r--vcl/unx/gtk3/gtk3gtkframe.cxx9
-rw-r--r--vcl/win/window/salframe.cxx4
9 files changed, 10 insertions, 28 deletions
diff --git a/include/tools/wintypes.hxx b/include/tools/wintypes.hxx
index 781865d1ff88..f7ebaa2a5075 100644
--- a/include/tools/wintypes.hxx
+++ b/include/tools/wintypes.hxx
@@ -179,7 +179,6 @@ WinBits const WB_NOSHADOW = SAL_CONST_INT64(0x400000000);
WinBits const WB_TOOLTIPWIN = SAL_CONST_INT64(0x800000000);
WinBits const WB_OWNERDRAWDECORATION = SAL_CONST_INT64(0x2000000000);
WinBits const WB_DEFAULTWIN = SAL_CONST_INT64(0x4000000000);
-WinBits const WB_NEEDSFOCUS = SAL_CONST_INT64(0x1000000000);
WinBits const WB_POPUP = SAL_CONST_INT64(0x20000000);
WinBits const WB_HSCROLL = WB_HORZ;
diff --git a/vcl/inc/salframe.hxx b/vcl/inc/salframe.hxx
index dacf3fabc1b5..c08486f5118c 100644
--- a/vcl/inc/salframe.hxx
+++ b/vcl/inc/salframe.hxx
@@ -74,8 +74,6 @@ enum class SalFrameStyleFlags
INTRO = 0x00000100,
// partial fullscreen: fullscreen on one monitor of a multimonitor display
PARTIAL_FULLSCREEN = 0x00800000,
- // floating window that needs to be focusable
- FLOAT_FOCUSABLE = 0x04000000,
// system child window inside another SalFrame
SYSTEMCHILD = 0x08000000,
// plugged system child window
diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index 5c59dc883593..972b241752d8 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -278,8 +278,7 @@ class GtkSalFrame : public SalFrame, public X11WindowProvider
return
(m_nStyle & SalFrameStyleFlags::FLOAT) && // only a float can be floatgrab
!(m_nStyle & SalFrameStyleFlags::TOOLTIP) && // tool tips are not
- !(m_nStyle & SalFrameStyleFlags::OWNERDRAWDECORATION) && // toolbars are also not
- !(m_nStyle & SalFrameStyleFlags::FLOAT_FOCUSABLE); // focusable floats are not
+ !(m_nStyle & SalFrameStyleFlags::OWNERDRAWDECORATION); // toolbars are also not
}
bool isChild( bool bPlug = true, bool bSysChild = true )
diff --git a/vcl/osx/salframeview.mm b/vcl/osx/salframeview.mm
index d16316906f64..d4d37c88fc9e 100644
--- a/vcl/osx/salframeview.mm
+++ b/vcl/osx/salframeview.mm
@@ -242,8 +242,6 @@ static AquaSalFrame* getMouseContainerFrame()
return YES;
if( mpFrame->mbFullScreen )
return YES;
- if( (mpFrame->mnStyle & SalFrameStyleFlags::FLOAT_FOCUSABLE) )
- return YES;
return [super canBecomeKeyWindow];
}
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index 0e844e2455d5..1e273749f073 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -1738,7 +1738,7 @@ void ImplBorderWindow::ImplInit( vcl::Window* pParent,
{
// remove all unwanted WindowBits
WinBits nOrgStyle = nStyle;
- WinBits nTestStyle = (WB_MOVEABLE | WB_SIZEABLE | WB_ROLLABLE | WB_PINABLE | WB_CLOSEABLE | WB_STANDALONE | WB_DIALOGCONTROL | WB_NODIALOGCONTROL | WB_SYSTEMFLOATWIN | WB_INTROWIN | WB_DEFAULTWIN | WB_TOOLTIPWIN | WB_NOSHADOW | WB_OWNERDRAWDECORATION | WB_SYSTEMCHILDWINDOW | WB_NEEDSFOCUS | WB_POPUP);
+ WinBits nTestStyle = (WB_MOVEABLE | WB_SIZEABLE | WB_ROLLABLE | WB_PINABLE | WB_CLOSEABLE | WB_STANDALONE | WB_DIALOGCONTROL | WB_NODIALOGCONTROL | WB_SYSTEMFLOATWIN | WB_INTROWIN | WB_DEFAULTWIN | WB_TOOLTIPWIN | WB_NOSHADOW | WB_OWNERDRAWDECORATION | WB_SYSTEMCHILDWINDOW | WB_POPUP);
if ( nTypeStyle & BORDERWINDOW_STYLE_APP )
nTestStyle |= WB_APP;
nStyle &= nTestStyle;
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index edbdbdde2220..cbfcc37b1dcc 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -913,7 +913,7 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p
nBorderTypeStyle |= BORDERWINDOW_STYLE_FRAME;
nStyle |= WB_BORDER;
}
- VclPtrInstance<ImplBorderWindow> pBorderWin( pParent, nStyle & (WB_BORDER | WB_DIALOGCONTROL | WB_NODIALOGCONTROL | WB_NEEDSFOCUS), nBorderTypeStyle );
+ VclPtrInstance<ImplBorderWindow> pBorderWin( pParent, nStyle & (WB_BORDER | WB_DIALOGCONTROL | WB_NODIALOGCONTROL), nBorderTypeStyle );
static_cast<vcl::Window*>(pBorderWin)->mpWindowImpl->mpClientWindow = this;
pBorderWin->GetBorder( mpWindowImpl->mnLeftBorder, mpWindowImpl->mnTopBorder, mpWindowImpl->mnRightBorder, mpWindowImpl->mnBottomBorder );
mpWindowImpl->mpBorderWindow = pBorderWin;
@@ -968,8 +968,6 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p
nFrameStyle = SalFrameStyleFlags::FLOAT;
if( nStyle & WB_OWNERDRAWDECORATION )
nFrameStyle |= (SalFrameStyleFlags::OWNERDRAWDECORATION | SalFrameStyleFlags::NOSHADOW);
- if( nStyle & WB_NEEDSFOCUS )
- nFrameStyle |= SalFrameStyleFlags::FLOAT_FOCUSABLE;
}
else if( mpWindowImpl->mbFloatWin )
nFrameStyle |= SalFrameStyleFlags::TOOLWINDOW;
diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx
index 177299024c5b..f813e64e38c0 100644
--- a/vcl/unx/gtk/gtksalframe.cxx
+++ b/vcl/unx/gtk/gtksalframe.cxx
@@ -1205,8 +1205,7 @@ void GtkSalFrame::Init( SalFrame* pParent, SalFrameStyleFlags nStyle )
m_nStyle = nStyle;
GtkWindowType eWinType = ( (nStyle & SalFrameStyleFlags::FLOAT) &&
- ! (nStyle & (SalFrameStyleFlags::OWNERDRAWDECORATION|
- SalFrameStyleFlags::FLOAT_FOCUSABLE))
+ ! (nStyle & SalFrameStyleFlags::OWNERDRAWDECORATION)
)
? GTK_WINDOW_POPUP : GTK_WINDOW_TOPLEVEL;
@@ -1251,7 +1250,7 @@ void GtkSalFrame::Init( SalFrame* pParent, SalFrameStyleFlags nStyle )
bool bDecoHandling =
! isChild() &&
( ! (nStyle & SalFrameStyleFlags::FLOAT) ||
- (nStyle & (SalFrameStyleFlags::OWNERDRAWDECORATION|SalFrameStyleFlags::FLOAT_FOCUSABLE) ) );
+ (nStyle & SalFrameStyleFlags::OWNERDRAWDECORATION) );
if( bDecoHandling )
{
@@ -1273,10 +1272,6 @@ void GtkSalFrame::Init( SalFrame* pParent, SalFrameStyleFlags nStyle )
eType = GDK_WINDOW_TYPE_HINT_TOOLBAR;
lcl_set_accept_focus( GTK_WINDOW(m_pWindow), false, true );
}
- else if( (nStyle & SalFrameStyleFlags::FLOAT_FOCUSABLE) )
- {
- eType = GDK_WINDOW_TYPE_HINT_UTILITY;
- }
if( (nStyle & SalFrameStyleFlags::PARTIAL_FULLSCREEN )
&& getDisplay()->getWMAdaptor()->isLegacyPartialFullscreen() )
{
@@ -2201,7 +2196,7 @@ void GtkSalFrame::ToTop( sal_uInt16 nFlags )
* to our window - which it of course won't since our input hint
* is set to false.
*/
- if( (m_nStyle & (SalFrameStyleFlags::OWNERDRAWDECORATION|SalFrameStyleFlags::FLOAT_FOCUSABLE)) )
+ if (m_nStyle & SalFrameStyleFlags::OWNERDRAWDECORATION)
{
// sad but true: this can cause an XError, we need to catch that
// to do this we need to synchronize with the XServer
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index db75016801c4..17f81a0a6206 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -1118,8 +1118,7 @@ void GtkSalFrame::Init( SalFrame* pParent, SalFrameStyleFlags nStyle )
m_nStyle = nStyle;
GtkWindowType eWinType = ( (nStyle & SalFrameStyleFlags::FLOAT) &&
- ! (nStyle & (SalFrameStyleFlags::OWNERDRAWDECORATION|
- SalFrameStyleFlags::FLOAT_FOCUSABLE))
+ ! (nStyle & SalFrameStyleFlags::OWNERDRAWDECORATION)
)
? GTK_WINDOW_POPUP : GTK_WINDOW_TOPLEVEL;
@@ -1164,7 +1163,7 @@ void GtkSalFrame::Init( SalFrame* pParent, SalFrameStyleFlags nStyle )
bool bDecoHandling =
! isChild() &&
( ! (nStyle & SalFrameStyleFlags::FLOAT) ||
- (nStyle & (SalFrameStyleFlags::OWNERDRAWDECORATION|SalFrameStyleFlags::FLOAT_FOCUSABLE) ) );
+ (nStyle & SalFrameStyleFlags::OWNERDRAWDECORATION) );
if( bDecoHandling )
{
@@ -1187,10 +1186,6 @@ void GtkSalFrame::Init( SalFrame* pParent, SalFrameStyleFlags nStyle )
gtk_window_set_accept_focus(GTK_WINDOW(m_pWindow), false);
gtk_window_set_decorated(GTK_WINDOW(m_pWindow), false);
}
- else if( (nStyle & SalFrameStyleFlags::FLOAT_FOCUSABLE) )
- {
- eType = GDK_WINDOW_TYPE_HINT_UTILITY;
- }
gtk_window_set_type_hint( GTK_WINDOW(m_pWindow), eType );
gtk_window_set_gravity( GTK_WINDOW(m_pWindow), GDK_GRAVITY_STATIC );
}
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index 4b873a96ec74..fa5357226ffb 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -371,11 +371,11 @@ SalFrame* ImplSalCreateFrame( WinSalInstance* pInst,
nExSysStyle |= WS_EX_TOOLWINDOW;
pFrame->mbFloatWin = TRUE;
- if ( (pEnvTransparentFloats /* does not work remote! || (nSalFrameStyle & SalFrameStyleFlags::FLOAT_FOCUSABLE) */ ) )
+ if (pEnvTransparentFloats)
nExSysStyle |= WS_EX_LAYERED;
}
- if( (nSalFrameStyle & SalFrameStyleFlags::TOOLTIP) || (nSalFrameStyle & SalFrameStyleFlags::FLOAT_FOCUSABLE) )
+ if (nSalFrameStyle & SalFrameStyleFlags::TOOLTIP)
nExSysStyle |= WS_EX_TOPMOST;
// init frame data