Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
d178d3c9
Commit
d178d3c9
authored
Jan 04, 2022
by
Jean-Baptiste Mardelle
Browse files
Fix shortcuts sometimes broken with fullscreen monitor.
Fixes
#1287
parent
70761646
Pipeline
#118731
passed with stage
in 6 minutes and 43 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/mainwindow.cpp
View file @
d178d3c9
...
...
@@ -3854,7 +3854,6 @@ void MainWindow::triggerKey(QKeyEvent *ev)
// Trigger action
tempAction
->
trigger
();
ev
->
accept
();
activateWindow
();
return
;
}
}
...
...
src/monitor/glwidget.cpp
View file @
d178d3c9
...
...
@@ -759,8 +759,8 @@ void GLWidget::mousePressEvent(QMouseEvent *event)
m_panStart
=
event
->
pos
();
setCursor
(
Qt
::
ClosedHandCursor
);
}
event
->
accept
();
QQuickView
::
mousePressEvent
(
event
);
event
->
accept
();
}
void
GLWidget
::
mouseMoveEvent
(
QMouseEvent
*
event
)
...
...
src/monitor/monitor.cpp
View file @
d178d3c9
...
...
@@ -167,7 +167,6 @@ Monitor::Monitor(Kdenlive::MonitorId id, MonitorManager *manager, QWidget *paren
connect
(
m_verticalScroll
,
&
QAbstractSlider
::
valueChanged
,
this
,
&
Monitor
::
setOffsetY
);
connect
(
m_glMonitor
,
&
GLWidget
::
frameDisplayed
,
this
,
&
Monitor
::
onFrameDisplayed
,
Qt
::
DirectConnection
);
connect
(
m_glMonitor
,
&
GLWidget
::
mouseSeek
,
this
,
&
Monitor
::
slotMouseSeek
);
connect
(
m_glMonitor
,
&
GLWidget
::
monitorPlay
,
this
,
&
Monitor
::
slotPlay
);
connect
(
m_glMonitor
,
&
GLWidget
::
startDrag
,
this
,
&
Monitor
::
slotStartDrag
);
connect
(
m_glMonitor
,
&
GLWidget
::
switchFullScreen
,
this
,
&
Monitor
::
slotSwitchFullScreen
);
connect
(
m_glMonitor
,
&
GLWidget
::
zoomChanged
,
this
,
&
Monitor
::
setZoom
);
...
...
@@ -334,6 +333,7 @@ Monitor::Monitor(Kdenlive::MonitorId id, MonitorManager *manager, QWidget *paren
m_playAction
=
new
KDualAction
(
i18n
(
"Play"
),
i18n
(
"Pause"
),
this
);
m_playAction
->
setInactiveIcon
(
QIcon
::
fromTheme
(
QStringLiteral
(
"media-playback-start"
)));
m_playAction
->
setActiveIcon
(
QIcon
::
fromTheme
(
QStringLiteral
(
"media-playback-pause"
)));
connect
(
m_glMonitor
,
&
GLWidget
::
monitorPlay
,
m_playAction
,
&
QAction
::
trigger
);
QString
strippedTooltip
=
m_playAction
->
toolTip
().
remove
(
QRegularExpression
(
QStringLiteral
(
"
\\
s
\\
(.*
\\
)"
)));
// append shortcut if it exists for action
...
...
@@ -1010,11 +1010,17 @@ void Monitor::slotSwitchFullScreen(bool minimizeOnly)
}
}
void
Monitor
::
fixFocus
()
{
m_videoWidget
->
setFocus
();
}
// virtual
void
Monitor
::
mouseReleaseEvent
(
QMouseEvent
*
event
)
{
if
(
m_dragStarted
)
{
event
->
ignore
();
QWidget
::
mouseReleaseEvent
(
event
);
return
;
}
if
(
event
->
button
()
!=
Qt
::
RightButton
)
{
...
...
@@ -1116,8 +1122,8 @@ void Monitor::wheelEvent(QWheelEvent *event)
void
Monitor
::
mouseDoubleClickEvent
(
QMouseEvent
*
event
)
{
slotSwitchFullScreen
();
event
->
accept
();
slotSwitchFullScreen
();
}
void
Monitor
::
keyPressEvent
(
QKeyEvent
*
event
)
...
...
@@ -2503,7 +2509,8 @@ void Monitor::displayAudioMonitor(bool isActive)
if
(
isActive
&&
m_glWidget
->
isFullScreen
())
{
// If both monitors are fullscreen, this is necessary to do the switch
m_glWidget
->
showFullScreen
();
m_videoWidget
->
setFocus
();
pCore
->
window
()
->
activateWindow
();
pCore
->
window
()
->
setFocus
();
}
}
...
...
src/monitor/monitor.h
View file @
d178d3c9
...
...
@@ -142,8 +142,10 @@ public:
void
enableEffectScene
(
bool
enable
);
/** @brief Update the document's uuid - used for qml thumb cache*/
void
updateDocumentUuid
();
/** @brief Focus the timecode to all
l
ow editing*/
/** @brief Focus the timecode to allow editing*/
void
focusTimecode
();
/** @brief Ensure the video widget has focus to make keyboard shortcuts work */
void
fixFocus
();
protected:
...
...
src/monitor/monitormanager.cpp
View file @
d178d3c9
...
...
@@ -174,6 +174,8 @@ bool MonitorManager::activateMonitor(Kdenlive::MonitorId name)
if
(
name
==
Kdenlive
::
ClipMonitor
)
{
if
(
!
m_clipMonitor
->
monitorIsFullScreen
())
{
m_clipMonitor
->
parentWidget
()
->
raise
();
}
else
{
m_clipMonitor
->
fixFocus
();
}
if
(
!
m_clipMonitor
->
isVisible
())
{
pCore
->
displayMessage
(
i18n
(
"Do you want to <a href=
\"
#clipmonitor
\"
>show the clip monitor</a> to view timeline?"
),
MessageType
::
InformationMessage
);
...
...
@@ -186,6 +188,8 @@ bool MonitorManager::activateMonitor(Kdenlive::MonitorId name)
}
else
if
(
name
==
Kdenlive
::
ProjectMonitor
)
{
if
(
!
m_projectMonitor
->
monitorIsFullScreen
())
{
m_projectMonitor
->
parentWidget
()
->
raise
();
}
else
{
m_projectMonitor
->
fixFocus
();
}
if
(
!
m_projectMonitor
->
isVisible
())
{
pCore
->
displayMessage
(
i18n
(
"Do you want to <a href=
\"
#projectmonitor
\"
>show the project monitor</a> to view timeline?"
),
MessageType
::
InformationMessage
);
...
...
Write
Preview
Supports
Markdown
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