Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
454
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
c2b6026b
Commit
c2b6026b
authored
16 years ago
by
Ilkka Ollakka
Browse files
Options
Downloads
Patches
Plain Diff
Simplify screen position checking
screenRec.x() and .y() should be directly those offsets needed
parent
f83418ee
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/gui/qt4/components/controller.cpp
+3
-21
3 additions, 21 deletions
modules/gui/qt4/components/controller.cpp
with
3 additions
and
21 deletions
modules/gui/qt4/components/controller.cpp
+
3
−
21
View file @
c2b6026b
...
...
@@ -850,29 +850,11 @@ void FullscreenControllerWidget::showFSC()
{
msg_Dbg
(
p_intf
,
"Calculation fullscreen controllers center"
);
/* screen has changed, calculate new position */
i_screennumber
=
number
;
int
totalCount
=
QApplication
::
desktop
()
->
numScreens
();
QRect
screenRes
=
QApplication
::
desktop
()
->
screenGeometry
(
number
);
int
offset_x
=
0
;
int
offset_y
=
0
;
/* Loop all screens to get needed offset_x/y for
* physical screen center.
*/
for
(
int
i
=
0
;
i
<=
totalCount
;
i
++
)
{
QRect
displayRect
=
QApplication
::
desktop
()
->
screenGeometry
(
i
);
if
(
displayRect
.
width
()
+
offset_x
<=
screenRes
.
x
())
{
offset_x
+=
displayRect
.
width
();
}
if
(
displayRect
.
height
()
+
offset_y
<=
screenRes
.
y
())
{
offset_y
+=
displayRect
.
height
();
}
}
QPoint
pos
=
QPoint
(
offset_x
+
(
screenRes
.
width
()
/
2
)
-
(
width
()
/
2
),
offset_y
+
screenRes
.
height
()
-
height
());
QPoint
pos
=
QPoint
(
screenRes
.
x
()
+
(
screenRes
.
width
()
/
2
)
-
(
width
()
/
2
),
screenRes
.
y
()
+
screenRes
.
height
()
-
height
());
move
(
pos
);
i_screennumber
=
number
;
}
#ifdef WIN32TRICK
// after quiting and going to fs, we need to call show()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment