Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
7c51e98a
Commit
7c51e98a
authored
Feb 24, 2010
by
Erwan Tulou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
skins2: add support for --[no]-video-on-top (fix #685)
parent
46020239
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
4 deletions
+52
-4
modules/gui/skins2/commands/cmd_on_top.cpp
modules/gui/skins2/commands/cmd_on_top.cpp
+5
-0
modules/gui/skins2/commands/cmd_on_top.hpp
modules/gui/skins2/commands/cmd_on_top.hpp
+14
-0
modules/gui/skins2/src/vout_manager.cpp
modules/gui/skins2/src/vout_manager.cpp
+18
-0
modules/gui/skins2/src/window_manager.cpp
modules/gui/skins2/src/window_manager.cpp
+12
-4
modules/gui/skins2/src/window_manager.hpp
modules/gui/skins2/src/window_manager.hpp
+3
-0
No files found.
modules/gui/skins2/commands/cmd_on_top.cpp
View file @
7c51e98a
...
...
@@ -31,3 +31,8 @@ void CmdOnTop::execute()
{
getIntf
()
->
p_sys
->
p_theme
->
getWindowManager
().
toggleOnTop
();
}
void
CmdSetOnTop
::
execute
()
{
getIntf
()
->
p_sys
->
p_theme
->
getWindowManager
().
setOnTop
(
m_ontop
);
}
modules/gui/skins2/commands/cmd_on_top.hpp
View file @
7c51e98a
...
...
@@ -31,4 +31,18 @@
/// "Always on top" command
DEFINE_COMMAND
(
OnTop
,
"always on top"
)
class
CmdSetOnTop
:
public
CmdGeneric
{
public:
CmdSetOnTop
(
intf_thread_t
*
pIntf
,
bool
b_ontop
)
:
CmdGeneric
(
pIntf
),
m_ontop
(
b_ontop
)
{
}
virtual
~
CmdSetOnTop
()
{
}
virtual
void
execute
();
virtual
string
getType
()
const
{
return
"set on top"
;
}
private:
bool
m_ontop
;
};
#endif
modules/gui/skins2/src/vout_manager.cpp
View file @
7c51e98a
...
...
@@ -26,6 +26,7 @@
#endif
#include <vlc_vout.h>
#include <vlc_vout_display.h>
#include "vout_manager.hpp"
#include "window_manager.hpp"
...
...
@@ -34,6 +35,7 @@
#include "../commands/cmd_show_window.hpp"
#include "../commands/cmd_resize.hpp"
#include "../commands/cmd_voutwindow.hpp"
#include "../commands/cmd_on_top.hpp"
...
...
@@ -375,6 +377,22 @@ int VoutManager::controlWindow( struct vout_window_t *pWnd,
return
VLC_SUCCESS
;
}
case
VOUT_WINDOW_SET_STATE
:
{
unsigned
i_arg
=
va_arg
(
args
,
unsigned
);
unsigned
on_top
=
i_arg
&
VOUT_WINDOW_STATE_ABOVE
;
// Post a SetOnTop command
CmdSetOnTop
*
pCmd
=
new
CmdSetOnTop
(
pThis
->
getIntf
(),
on_top
);
AsyncQueue
*
pQueue
=
AsyncQueue
::
instance
(
pThis
->
getIntf
()
);
pQueue
->
push
(
CmdGenericPtr
(
pCmd
)
);
return
VLC_SUCCESS
;
}
default:
msg_Dbg
(
pWnd
,
"control query not supported"
);
return
VLC_EGENERIC
;
...
...
modules/gui/skins2/src/window_manager.cpp
View file @
7c51e98a
...
...
@@ -439,21 +439,29 @@ void WindowManager::hideAll() const
}
void
WindowManager
::
toggleOnTop
(
)
void
WindowManager
::
setOnTop
(
bool
b_ontop
)
{
// Update the boolean variable
VarBoolImpl
*
pVarOnTop
=
(
VarBoolImpl
*
)
m_cVarOnTop
.
get
();
pVarOnTop
->
set
(
!
pVarOnTop
->
get
()
);
pVarOnTop
->
set
(
b_ontop
);
//
Toggle
the "on top" status
//
set/unset
the "on top" status
WinSet_t
::
const_iterator
it
;
for
(
it
=
m_allWindows
.
begin
();
it
!=
m_allWindows
.
end
();
it
++
)
{
(
*
it
)
->
toggleOnTop
(
pVarOnTop
->
get
()
);
(
*
it
)
->
toggleOnTop
(
b_ontop
);
}
}
void
WindowManager
::
toggleOnTop
()
{
VarBoolImpl
*
pVarOnTop
=
(
VarBoolImpl
*
)
m_cVarOnTop
.
get
();
setOnTop
(
!
pVarOnTop
->
get
()
);
}
void
WindowManager
::
buildDependSet
(
WinSet_t
&
rWinSet
,
TopWindow
*
pWindow
)
{
...
...
modules/gui/skins2/src/window_manager.hpp
View file @
7c51e98a
...
...
@@ -126,6 +126,9 @@ public:
/// Hide the given window
void
hide
(
TopWindow
&
rWindow
)
const
{
rWindow
.
hide
();
}
/// Set/unset all the windows on top
void
setOnTop
(
bool
b_ontop
);
/// Toggle all the windows on top
void
toggleOnTop
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment