0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00
Commit Graph

6170 Commits

Author SHA1 Message Date
Dudemanguy
307255d00d wayland: avoid unneeded calls to xdg_toplevel state functions
The reconfigure event handles setting fullscreen, maximize, etc. We were
implictly relying on the compositor to just ignore mpv if we set a
redundant state (e.g. setting fullscreen when we're already fullscreen),
but kwin actually doesn't and operates again. This causes some subtle
issues when handling geometry on state changes. Rework the state change
calls so they are only executed if wl->geometry_configured isn't set yet
(i.e. the window just opened up for the first time). It's the only time
this is actually needed.
2024-04-13 14:33:58 +00:00
Dudemanguy
4023146a04 wayland: enforce a state change after a reconfigure
If mpv is coming out of some locked size state (fullscreen, maximized,
tiled), the window size given by the reconfigure event should be used
assuming the --auto-window-size option is set.

Fixes 8a9749b8a5
2024-04-13 14:33:58 +00:00
Kacper Michajłow
a9354b36ca vo_gpu_next: set target resolution to crop value
Use rect of the actual image instead of FBO size which includes
margins.
2024-04-13 13:37:12 +02:00
der richter
ee6794225d mac/vulkan: add support for frame timing via presentation feedback 2024-04-10 19:14:20 +02:00
der richter
6df07ce90c mac/window: fix window pinch gesture and modify current-window-scale
this will prevent jumping of the window size in the case the window size
was 'externally' modified and not via the window-scale property, when
using the pinch gesture.

Fixes #11594
Fixes #13799
2024-04-10 19:13:00 +02:00
nanahi
9bb7d96bf9 various: make filter internal function names more descriptive
Lots of filters have generic internal function names like "process".
On a stack trace, all of the different filters use this name,
which causes confusion of the actual filter being processed.

This renames these internal function names to carry the filter names.
This matches what had already been done for some filters.
2024-04-10 19:00:22 +02:00
Kacper Michajłow
89cc477ef1 vo_gpu_next: keep target params in priv instead of alocating it 2024-04-10 18:35:47 +02:00
Dudemanguy
0d250892ba Revert "vo_dmabuf_wayland: assume counter-clockwise rotations"
This commit was originally sparked by a change in sway. When looking at
the wording of the spec, it was believed that the rotation should be
counter-clockwise. But that was interpreted incorrectly. The rotation
direction in the spec is meant for compositors not clients. Clients
should be rotating clockwise and compositors rotate it the opposite
direction. Also see the discussion in upstream wayland*.

*: https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/369

This reverts commit 27ef1725e7.
2024-04-09 13:48:08 +00:00
Kacper Michajłow
d3941f235a bstr: change bstr0_s to bstr0_lit, restrict it only for string literals
Allows to avoid non-portable strlen usage. Also avoid "initializer
element is not constant" warnings on older GCC that doesn't like
explicit type specification in aggregate initialization.

Co-authored-by: NRK <nrk@disroot.org>
Co-authored-by: nanahi <130121847+na-na-hi@users.noreply.github.com>
2024-04-08 02:06:06 +02:00
Kacper Michajłow
2d4fae4f70 vo_tct: reduce lut_item size and generate it without snprintf 2024-04-07 20:23:04 +02:00
Kacper Michajłow
7d2b7fa019 vo_tct: use fwrite when appropriate 2024-04-07 20:23:04 +02:00
Kacper Michajłow
6177aa7616 vo_tct: add synchronized output support
See-Also: https://gist.github.com/christianparpart/d8a62cc1ab659194337d73e399004036
2024-04-07 20:23:04 +02:00
Kacper Michajłow
5a53fa7cad vo_tct: add --vo-tct-buffering option 2024-04-07 20:23:04 +02:00
Kacper Michajłow
fbc5e47e00 misc/bstr: add bstr0_s for static initialization 2024-04-07 20:23:04 +02:00
Kacper Michajłow
39d560676f vo_tct: write frame fully instead of every pixel
This is multiple times faster than just writing every pixel sequence
separately. Especially on slower terminal emulators. In general no need
to stress I/O, while we can just prepare the frame to print and do it
once.
2024-04-07 20:23:04 +02:00
Kacper Michajłow
2f76536f62 vulkan: use pl_vk_inst_create
This change is mostly motivated by missing
VK_KHR_portability_enumeration instance extension when enumerating the
devices. Which causes issues with MoltenVK which does not advertise full
Vulkan conformance.

To avoid duplicating code use pl_vk_inst_create() which correctly query
availability and enables the mentioned extension.

While at it fix the VkInstance leaking in vk_validate_dev().
2024-04-07 20:16:50 +02:00
Shuanglei Tao
3c1e983351 vo: add win32 context menu support 2024-04-06 08:24:06 +02:00
der richter
c555cfccfe mac/common: reuse hidpi window scale frame calculation helper 2024-04-04 19:39:27 +02:00
der richter
5178c5b7d1 mac/window: cleanup unfsContentFrame usage and make it none optional 2024-04-04 19:39:27 +02:00
der richter
fc36e5d71e mac/window: fix unfs window size retrieval
the unfsContentFrame wasn't updated when externally resized leading to
a wrong unfs window size afterwards. update it on windowDidResize event
when not in fs, not animating and not live resizing.
2024-04-04 19:39:27 +02:00
nanahi
a140d2788c wayland_common: set mouse position on pointer enter
At least on some compositors, when the pointer enters a surface,
only a wl_pointer_enter event is generated, but not wl_pointer_motion.
This results in the initial mouse position being lost, which is
especially problematic when input simulation is used.

Fix this by setting the mouse position on pointer enter event.
2024-04-01 01:17:22 +00:00
der richter
92cb47338f mac/view: fix cursor visibility when toggling fullscreen
this broke with the recent refactor of the input handling. one of the
edge cases was not considered, where not every mouse down event has a
corresponding mouse up event, eg all double clicks or more only have one
up event after the first down event.

this was handled correctly previously.

Fixes #13777
2024-03-29 14:20:40 +01:00
der richter
ba45f2004f mac: cleanup swift bridge header imports and unify them 2024-03-29 14:20:40 +01:00
der richter
ed0587692f mac/log: rename log functions and cleanup class 2024-03-29 14:20:40 +01:00
der richter
ceaabb7b98 mac: use LogHelper directly instead of mp_log 2024-03-29 14:20:40 +01:00
der richter
e7df95b10d mac: rename mpvHandle to mpv 2024-03-29 14:20:40 +01:00
der richter
e71e340b77 mac: remove now unnecessary objective-c forwarding 2024-03-29 14:20:40 +01:00
der richter
1bc680d32a mac/apphub: move menu bar into AppHub 2024-03-29 14:20:40 +01:00
der richter
1acca1d3c4 mac/apphub: move app icon into AppHub
split up AppHub header in obj-c and c parts and make it a bidirectional
bridging.
2024-03-29 14:20:40 +01:00
nanahi
6fed2f8e58 win32: fix native key repeat support
win32 does not respect --native-keyrepeat option, and native key
repeat has been broken since 0ab3482f73.

This lets mpv respect the --native-keyrepeat option on win32.
2024-03-29 14:07:37 +01:00
nanahi
f4a7931c53 vo_gpu: support video-target-params 2024-03-27 22:08:56 +01:00
nanahi
3f17b18a33 vo_direct3d: support video-target-params
The backbuffer format is available.
2024-03-27 22:08:56 +01:00
nanahi
76541db2a7 vo_xv: support video-target-params
The target colorspace depends on whether the xv adaptor supports
setting BT.709 colorspace.
2024-03-27 22:08:56 +01:00
der richter
5ab3060961 cocoa-cb: use EventHelper for event handling 2024-03-24 23:03:48 +01:00
der richter
2a4bf7ca22 cocoa-cb: use a separate mpv_handle for cocoa-cb to simplify shutdown 2024-03-24 23:03:48 +01:00
der richter
7e07e1a087 mac/apphub: migrate remaining events functionality to new AppHub
add new app_bridge objc file for bridging between mpv core and app
functionality. replace old EventsResponder singleton with AppHub.

another step to clean up all App functionality and have one central
place for it.
2024-03-24 23:03:48 +01:00
Lynne
cda5a787d5 hwdec/vulkan: enable the stable AV1 extension
As no drivers were ever released with the unstable extension,
it's not needed anymore.

Not bumping the required headers version yet.
2024-03-24 13:25:35 -07:00
der richter
12782aad6c mac: optimise and shorten some code 2024-03-21 18:33:15 +01:00
der richter
9e03ab5e1e mac/option: remove now unused computed option variables 2024-03-21 18:33:15 +01:00
der richter
204e3f0df6 mac/option: rename option structs to properly represent their content
also optimise option cache setup.
2024-03-21 18:33:15 +01:00
der richter
f72dfd48d0 mac/libmpv: remove mac option handling in favour of option handler
since the option handler is not optional anymore and available on init
in cocoa-cb we don't need to duplicate this functionality in libmpv
anymore.
2024-03-21 18:33:15 +01:00
der richter
b480daad88 mac/option: make option helper none optional
gets rid of some unwrapping boilerplate and nil coalescing operators.
2024-03-21 18:33:15 +01:00
der richter
6defd49aa1 mac/option: make option helper vo struct independent 2024-03-21 18:33:15 +01:00
der richter
2d9be04c00 mac/option: remove unused and obsolete variables 2024-03-21 18:33:15 +01:00
der richter
dc5059d027 mac/option: move option functionality from mpv helper to option helper
delete now empty mpv helper
2024-03-21 18:33:15 +01:00
der richter
283d0877c4 mac/type: move c<>swift type bridging into a dedicated type helper 2024-03-21 18:33:15 +01:00
sfan5
6b8bd8072f video/egl_helpers: fix fallback logic for EGL_KHR_create_context
Both possible paths had bugs:
For OpenGL it passed EGL_CONTEXT_CLIENT_VERSION, which - in older versions
of the standard - was not permitted.
For GLES it always assumed EGL_CONTEXT_FLAGS_KHR to work, which belongs to the
aforementioned extension.

Ironically this was never a problem (probably saved by implementations
not being overly strict) except in 2024 on an emulated Android 14 device
that trips over this edge case. It is a mystery.
2024-03-21 18:27:08 +01:00
sfan5
b3ca600acb video/egl_helpers: log error for eglCreateContext 2024-03-21 18:27:08 +01:00
nanahi
5fea0f9a47 various: use thread safe mp_strerror() 2024-03-19 19:30:27 +01:00
nanahi
df01ebaafc image_writer: refactor screenshot write functions
When 3cb9119984 introduced AVIF screenshot
support, FILE * in write functions were replaced by filenames. This
resulted in unnecessary duplication of FILE * handling code and the usage
of avio_open API made it hard to use exclusive open with it.

To unify file handling, use avio_open_dyn_buf instead which writes to
memory instead. This way FILE * can be used for the write functions
and file handling code can be deduplicated. Since we now control
the file opening, exclusive open can now be used for AVIF screenshots.
2024-03-19 19:30:27 +01:00
nanahi
9a861c930b image_writer: fix TOCTOU in screenshot filename generation
The screenshot command is documented to not overwrite existing files.
However, there is a race window between the filename is generated with
gen_fname and when the file is open to write. Specifically, the
convert_image function in this window can be very time consuming
depending on video and screenshot image format and size. This results
in existing file being overwritten because the file writing functions
don't check for the existance of file.

Fix this be opening the file in exclusive mode. Add overwrite parameter to
write_image for other operations that are documented to overwrite existing
files, like screenshot-to-file. Note that for write_avif, checking
existance is used instead because avio_open does not support exclusive
open mode.
2024-03-19 19:30:27 +01:00
Kacper Michajłow
374470d471 repack: add restrict qualifier to src/dst pointers
Allows compiler to do its job and optimize this code. We don't really
want to repack in-place.
2024-03-19 13:04:05 +01:00
nanahi
e0b517985b win32: resolve dropped shell links (Windows shortcuts)
When a shell link is dropped onto the mpv window, the file name will be
replaced by the file name of its target so that the linked file is played.
2024-03-19 11:34:00 +01:00
Leo Izen
3e7d36c295 video/image_writer: attach MDVC metadata and CLLI metadata
This commit allows image_writer to attach HDR metadata to AVFrames via
the corresponding AVFrameSideData attachments, if present. It does this
by calling pl_avframe_set_color, already used by mp_image_to_avframe.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
2024-03-19 09:49:04 +01:00
llyyr
f914947dda vo_gpu_next: make dither-depth=auto mean 8 bpc for non-d3d11 SDR
Fixes the issue described in https://github.com/mpv-player/mpv/issues/11862
for SDR files for non-d3d11 gpu-api. We currently don't have a smarter
way to get the real on-the-wire bpc for other APIs, so this is the best
that can be done.
2024-03-19 09:06:01 +01:00
llyyr
16ae76948d vulkan: remove color_depth stub
Needed for the next commit
2024-03-19 09:06:01 +01:00
nanahi
a6f8d1d961 vo_gpu_next: fix -Wembedded-directive warning
warning: embedding a directive within macro arguments has undefined behavior
2024-03-19 08:58:18 +01:00
nanahi
59f23f5c29 video/out/gpu/spirv: fix warning: zero size arrays are an extension 2024-03-19 08:58:18 +01:00
nanahi
82a186567e various: fix -Wold-style-declaration warning
warning: `static' is not at beginning of declaration
2024-03-19 08:58:18 +01:00
nanahi
4f381f2137 video/out/placebo/utils: fix -Wignored-qualifiers warning
warning: type qualifiers ignored on function return type
2024-03-19 08:58:18 +01:00
Kacper Michajłow
cbe30f614d vo_gpu_next: don't render ASS subtitles at HDR colorspace
Upstream ASS specification says that all subtitles should be rendered
with color primaries and transfer matching their associated video. But
as expected after further discussion the decision has been made to
fallback to SDR mode in case of HDR video.

See-Also: 649a7c2e1f/libass/ass_types.h (L233-L237)
See-Also: libass/libass#297
See-Also: mpv-player#13381
Fixes: mpv-player#13673
2024-03-18 21:24:06 +01:00
Kacper Michajłow
c155c18023 win32: remove all NC area on Windows 10 with --title-bar=no
Windows 10 top bar height cannot be adjusted individually when
WS_CAPTION is enabled due to buggy DWM NC drawing behavior. The issue is
fixed in Windows 11.

To keep consistent window look remove the border on each side, but only
on Windows 10.
2024-03-18 02:22:28 +00:00
Kacper Michajłow
e8b085fbb5 win32: add helper function to check Windows 10 build number 2024-03-18 02:22:28 +00:00
Kacper Michajłow
bb15c50658 win32: adjust top border offset when title bar is disabled
Windows 11 draws border regardless, so we are 1px off on window size,
blending border with one line of video. Fix that by adding the border to
our internal windows size calculation.

Windows 10 on the other hand has a bug where specifying left and top NC
area will trigger title bar drawn in full height always. Keep old
behaviour in this case. Also while there is similar "visible" border
there, it seems to be transparent on Windows 10.

For high contrast themes, don't adjust title bar height and instead
remove WS_CAPTION to have the same border all around the window, as DWM
doesn't make borders invisible in this case.
2024-03-18 02:22:28 +00:00
Kacper Michajłow
1764d772ad win32: add DWMWA_VISIBLE_FRAME_BORDER_THICKNESS definition 2024-03-18 02:22:28 +00:00
Kacper Michajłow
3045f1458d win32: use dpi aware GetSystemMetricsForDpi 2024-03-18 02:22:28 +00:00
nanahi
ee586c526d win32: update maximized state when leaving fullscreen
If the window-maximized is set while in fullscreen, it needs to be applied
when leaving fullscreen, as noted in the comment.
2024-03-18 01:58:53 +00:00
nanahi
2be8976d59 win32: fix window maximized state after setting window size
With runtime geometry change, currently it only results in a
SetWindowPos call to resize the window. However, SetWindowPos doesn't
change the window maximized state, so Windows still thinks that the
window is maximized even though it no longer covers the whole workspace.
This results in visual glitches, and if the window is dragged afterwards
it's "restored" again.

Fix this by correctly setting the window maximized state in this case.
2024-03-18 01:58:53 +00:00
nanahi
8a9749b8a5 wayland_common: respect compositor's preferenced size on state change
Currently mpv always uses the previous window size when unmaximizing
or exiting fullscreen. This disregards compositor's preferenced size in
the configure event, resulting in wrong window size if changing window
state and size are delivered in the same configure event.

It's better to always respect the preferenced size instead, unless
the state change is due to runtime geometry change, where we want
to use our preference.
2024-03-17 14:59:26 +00:00
nanahi
ea33d52a4a wayland_common: always use the current geometry for prepare_resize
In the xdg_toplevel_configure handler, in some cases the geometry is
not equal to the width and height in the event. This can happen
when runtime geometry change is requested (a new size is set),
or in the case of wl->state_change || width == 0 || height == 0
(the old size is used).

However, prepare_resize always uses the width and height in the event
and not the corrected geometry here. This causes
xdg_surface_set_window_geometry using the wrong value resulting in
wrong size of window decoration. Amusingly, the debug message right
above it uses the correct size.

Fix this by using the updated geometry size instead. Since now all
prepare_resize have parameters of 0, the width and height parameters
are no longer needed.

Fixes: 828dd65ef8
2024-03-17 14:59:26 +00:00
nanahi
25ae54dd84 x11_common: unmaximize window on runtime geometry change
8e793bde78 made that changing geometry
while maximized has no effect until the window is unmaximazed. However,
this behavior is inconsistent with setting window-scale on all of win32,
wayland, and x11, which always unmaximizes the window and sets the
window size.

Since setting geometry is conceptually similar to setting window-scale
(both change the window size), they should have the same behavior.
If not fullscreen, unmaximize window on runtime geometry change to
keep the behavior consistent with window-scale.
2024-03-17 14:59:26 +00:00
nanahi
4370dc0cb6 win32: support runtime geometry update
Similar to other platforms. Also make sure that the x/y positions are set
on geometry update.
2024-03-17 14:59:26 +00:00
nanahi
f236e249a4 x11_common: fix window x/y position when updating geometry on runtime
Currently, setting geometry on runtime only changes the window size
but not the position. This is because reset_size is only set if
the window size is changed, and vo_x11_highlevel_resize doesn't set
the window position without force_window_position enabled. Fix this
by setting the related flags and perform a window move when
geometry is updated.

Fixes 8e793bde78.
2024-03-17 14:59:26 +00:00
Kacper Michajłow
7265bde26a gpu-next: add support for --dither-depth=auto
On supported APIs.
Fixes: https://github.com/mpv-player/mpv/issues/11862
2024-03-17 14:28:00 +01:00
Kacper Michajłow
16e3d7dca6 d3d11: get real on the wire bits per color channel 2024-03-17 14:28:00 +01:00
Kacper Michajłow
2b0c7b1aa4 d3d11: add mp_get_dxgi_output_desc 2024-03-17 14:28:00 +01:00
der richter
3afcaeb71a mac/view: optimise drag and drop event handling 2024-03-16 15:29:27 +01:00
der richter
a4eddf742d mac/input: move scroll wheel event handling into input helper 2024-03-16 15:29:27 +01:00
der richter
9a4c673dd7 mac/input: optimise mouse movement enabled check 2024-03-16 15:29:27 +01:00
der richter
db4eac140d mac/input: move mouse event handling into input helper 2024-03-16 15:29:27 +01:00
sfan5
830f6ccd6b vo_{drm,wlshm}: make query_format checks more correct
We're using mp_sws here, so we should ask it for format support
and not the underlying library (usually swscale) directly.
2024-03-16 13:27:34 +01:00
sfan5
aa75a0e9d2 vo_drm: add support for YUYV format
As the first aligned format this required a fix to reconfig().

Adding the other component-swapped formats in this group would be trivial
but I checked the DRM database [1] and no driver exists that supports
one of those but not YUYV and this is quite fringe as-is, so I opted not to.

[1] <https://drmdb.emersion.fr/formats>
2024-03-16 13:27:34 +01:00
sfan5
bc8038cffd vo_{drm,wlshm,x11}: add support for video-target-params 2024-03-16 13:27:34 +01:00
sfan5
2893b7d0f5 vo: move target_params into responsibility of VO
The VO generic code tries to be helpful and resets this after
each reconfig. However for the simpler VOs the target params
are constant after a reconfig or even for the entire lifetime.
So it's clearly better to let the VO decide.

This also allows the VO to use a static buffer instead.
2024-03-16 13:27:34 +01:00
sfan5
44f54357ca context_drm_egl: log fallback correctly
Currently a theoretical concern because we handle all existing formats.
2024-03-16 13:27:34 +01:00
sfan5
6b452788c4 vo_drm: add support for BGR formats 2024-03-16 13:27:34 +01:00
sfan5
93a5059e8c vo_drm: use native matching pixel format for XRGB2101010 2024-03-16 13:27:34 +01:00
der richter
3ef3bbf93d mac/event: move key event handling to input helper and optimise it 2024-03-14 23:33:15 +01:00
der richter
18fb71498b mac/events: remove redundant functions and optimise input helper usage
some redundant functions that jump through hoops.
2024-03-14 23:33:15 +01:00
der richter
055e9cd93e mac/helper: move input ctx related functionality into new input helper
also make functions thread safe.
2024-03-14 23:33:15 +01:00
Dudemanguy
5dd2d19519 wayland_common: move WAYLAND_DISPLAY check above vo_wayland_state init
Segfaults otherwise on uninit because some objects are created while
others are not. Move it to the very top since the purpose of this is to
skip wayland initialization entirely while autoprobing.

Fixes f6f1721101.
2024-03-13 20:23:10 -05:00
nanahi
f6f1721101 wayland_common: require WAYLAND_DISPLAY to be set for initialization
Currently, Wayland is above X11 and DRM in probe order. The success
of automatic probing depends on the fact that unsuitable backends
would fail to initialize. For example, X11 backend (which uses Xlib)
fails to initialize if DISPLAY environment variable is not set, so
starting mpv in VT console will pick the DRM backend as expected,
even when an X server is running in another VT.

However, libwayland-client used by the Wayland backend has the
"helpful" behavior of falling back to "wayland-0" if WAYLAND_DISPLAY
is not set. This breaks autoprobing if mpv is started from X server
or VT console while a running Wayland compositor running in another
VT (or even running as an X client) is using "wayland-0" for protocol
socket name: mpv will start playing in the Wayland compsitor instead
of using the X11 or DRM backends.

Similar to DISPLAY for X server, We should consider exporting
WAYLAND_DISPLAY to child processes the responsibility of Wayland
compositors, and any compositor not doing this should be considered
broken. Thus we now require WAYLAND_DISPLAY to be set for the
backend initialization to succeed to make sure that autoprobing
works as intended.
2024-03-13 22:39:43 +00:00
Dudemanguy
38b5dcb441 vo_gpu/vo_gpu_next: fix transparency in glx
It seems that GLX requires us to explicitly set opts.want alpha before
ra_ctx_create is called. b7fd232524
rearranged the function calls in a way made this not work. Fix this by
rearranging it again so the value is set before ra_ctx is created.
2024-03-13 22:39:31 +00:00
nanahi
27fb4c474f vo_gpu: fix broken chroma plane for rotated semi-planar formats
For image formats with 2 or more chroma planes such as YU12, there is
a plane merging pass for these planes calling finish_pass_tex which
does a format conversion. After this conversion, the cscale shader
afterwards works properly.

However, for image formats with only 1 chroma plane (semi-planar formats),
including NV12 and P010, this merging pass is never called, which breaks
the cscale shader afterwards if the video is rotated with subsampled
chroma.

Fix this by adding an explicit conversion pass if this situation is
detected after the pre-scale hooks, so if there are shaders hooking on
CHROMA (like the deband filter) and the conversion is done by pass_hook
already, this conversion won't be called.
2024-03-11 21:29:57 +01:00
der richter
0ec385bc76 options: remove --focus-on-open and add --focus-on
replaces the old focus-on-open option with a more generic focus-on
options that can be extended.

adjust the only platform that uses that option.

Fixes #8337
2024-03-10 14:53:07 +01:00
Kacper Michajłow
024edb2991 vf_format: add hdr10plus sub-parameter to format video filter 2024-03-09 05:58:52 +00:00
Kacper Michajłow
d9c1e9bc5c mp_image: add Dolby Vision metadata mapping
Remove side-loading metadata in vo_gpu_next.c and remove unneded
side-data duplication.
2024-03-09 05:58:52 +00:00
Kacper Michajłow
05c8d5a93a csputils: add missing PL_COLOR_SYSTEM names 2024-03-09 05:58:52 +00:00
Kacper Michajłow
391261f757 mp_image: add mp_image_params_static_equal for finer comparision
In case of dynamic HDR metadata is present.
2024-03-09 05:58:52 +00:00
Dudemanguy
120b0ac412 wayland: always rescale geometry if in a fullscreen/maximized state
This should only be a problem during initialization. If in a
multi-monitor setup, mpv guesses the wrong scale value and the user
passes --fs, the scaled size will be wrong and you have to unfullscreen
and fullscreen again to fix it. This is because rescale geometry won't
do anything if the value of hidpi-window-scale is false (the default) so
the geometry is never rescaled to the correct value thus the wrong size.
Normally, mpv will just correct itself after subsequent events occur but
because it is considered a locked size (as it should be), we avoid doing
any other resizing events thus it never gets corrected. Fix this by just
always rescaling the geometry in the locked size case. It shouldn't
matter elsewhere because mpv will always have the correct scale value
and the possibility of having the wrong one is only possible on startup.

Fixes ded181f642
2024-03-09 04:27:29 +00:00