Reparenting a mapped window to root causes it to become a toplevel
window and can cause window managers to reparent the window themselves
to show their decorations.
This could happen in two situations:
1. Theoretically it could happen briefly between WindowReleased and
WindowClose.
2. It could trigger a race between VLC and the WM if there is a quick
sequence of WindowOpen -> WindowReleased -> WindowClose -> WindowOpen
such as when using single instance mode. If the X-server in this
situation happens to re-use the XID of the X11 indirection window
from the first WindowOpen for the second WindowOpen, this could
result in the following race:
- VLC creates a new X11 indirection window, reparents and maps it
- VLC reparents it to root
- VLC closes the connection, freeing the XID
- VLC opens a new connection
- VLC creates a new indirection window with the same XID as before
and reparents and maps it
- The X-server sends a MapRequest for the *first* X11 indirection
window caused by the reparent to root to the WM
- The WM sees a new toplevel window and reparents it. Because the XID
used by that reparent request is the same as of the newly created
indirection window, the new window ends up getting reparented.
This then would result in the indirection window remaining as
toplevel window. The exact order might change slightly between the
different processes, but as long as the reparent request by the WM is
the last one, the issue will trigger.
Closes#25692
When the video window is closed normally, there are no needs to
reparent it. In this case, we can retain the pre-3.0.13 behaviour
whence we simply close the video window as a children of the Qt UI.
This fixes a transient visual glitch when stopping playback or
disabling the video track. This also saves one full round-trip through
the X server at that time as XSync().
The video widget is normally released when the window provider is
closed. But it can also be released when the main UI is closed, even
though the window provider is still active.
The reason why the playback panel is not aligned to the bottom in fullscreen mode on Linux is because the desktop environment panels (like taskbar, topbar, etc.) set `struts` that limit the area over which the top-level window can be moved programmatically. To get around this, we need to tell the window to ignore window manager hints (by setting the Qt::X11BypassWindowManagerHint flag) and manually limit its movement.
BUG: 22563
Now that labels have to be selectable, force the cursor to the arrow
cursor instead of the text selection cursor.
(cherry picked from commit 4980447fd4)
Signed-off-by: Marvin Scholz <epirat07@gmail.com>
Default to the system font for extension textfields, labels and
webviews.
(cherry picked from commit 222bc139ad)
Signed-off-by: Marvin Scholz <epirat07@gmail.com>
New M1 Macs contain a notch, covering part of the screen. Analog to
the Quicktime player, when implementing VLCs internal fullscreen,
the video is scaled inside the safe area of the notch only, leaving
the top area black.
Fixes#26291
If the user disabled the advanced controls widgets in the
interface customization options, it would still show the
menu item for them, but interactions with the menu item
would just do nothing.
Instead properly disable the menu item when there is no
advanced buttons widget to show/hide.
Ref: #14217
Moves all relevant sorting logic into the new helper function
that exposes the arguments to playlist_RecursiveNodeSort
directly, need to use sort orders that are not linked to any
column.
The "ifdef" doesn't seem to be taken in account. It's as if the define was
always set. Now that the define is properly used we need to pass it to moc.
(cherry picked from commit 568aba0b02) (edited)
edited:
- on 3.0 the files are not in a dialog subfolder
Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
Running the (3.0) code with --no-qt-error-dialogs asserts.
(cherry picked from commit 0733018f8a) (edited)
edited:
- on 3.0 the files are not in a dialog subfolder
Fixup user-provided URIs, similar to what most browser nowadays do.
Fix#21661
(cherry picked from commit cc6a5a7370)
Signed-off-by: Marvin Scholz <epirat07@gmail.com>
Currently, the touchbar and the system were always provided with
playback information on macOS 10.12.2 and higher. This patch respects
option used for the previous implementation to optionally disable this
behavior for increased privacy and to potential conflicts with third
party apps.
1) for module (plugin) tree nodes, the object already holds a pointer to
the associated module object is was created for, so we can use that
directly instead of wastefully doing a module_find() search.
2) the module_find() search actually is unreliable; modules can be
mis-identified through it.
to explain the second point: from investigating a crash with the Qt prefs
search facility, in relation to a commit that happens to expand the number
of plugins with empty config sets, a flaw was identified (fixed separately)
relating to the search code not getting the NULL pointer it was expecting
in the case of empty module sets, however it did not explain why the search
code was actually encountering modules with empty option sets in the first
place, since only plugins with non-empty sets were being added to the
prefs tree; digging into this, an example module where this was the case
was an 'a52' module; the one being looked at by the search code was the
packetizer one, which has no options, but the entry in the tree for which
the code was working on was the codec one, which has an option; it turned
out that the search code was wrongly assessing the option set of the
packetizer 'a52' module instead of the codec one because the
module_search() call had pointed to the wrong 'a52' module.
(cherry picked from commit eb7c25a7e2)
On macOS Sierra and higher, we will use the official API to enable
control of VLC, which will always be enabled as potential conflicts are
mitigated by the OS and it is possible to control more than one
application at the same time, so the option is ignored. On earlier
releases of macOS, SPMediaKeyTap can still be optionally disabled.
the item pointer provided to the constructor is that of a single hotkey
config item. using the longtext from this item in a tooltip on the label
for the entire hotkey table makes zero sense, so let's remove it.
- for the table shown in the simple view, the "key-play" option was
arbitrarily used for this.
- for the table shown in the advanced view, the text from the first
hotkey config item encountered was used.
(cherry picked from commit b0385e9324)
With module selection controls which feature a groupbox of module
checkboxes, if individual modules have their own longtext, that is
displayed in a tooltip when hovering on them; for all others, the help
text for the entire control (groupbox) gets displayed, which is just
confusing from a UX point of view.
This removes the general groupbox tooltip, thus fixing this.
It remains for the textbox portion of the control however, so hovering over
that still provides the helptext!
(cherry picked from commit e85dd95527)
if a panel only has one groupbox and it is empty, it was hidden, but
otherwise they were shown; this was surely a bug, and at any rate is
undesirably messy. all empty groupboxes are now hidden.
an example case: this fixes the empty "Performance options" groupbox (on
my system) under the top-level "Advanced" tree node in the advanced
preferences view, which happens to be very visible as the first panel
shown when switching to advanced mode.
(cherry picked from commit 9214590343)
Certain sets of options in the core option set use a cat/subcat of -1 as
a "hack" to avoid those options showing up in the GUI prefs set. This is
the case for options like --help for instance. While the Qt GUI plugin
respects this, the MacOSX one was missing checks for this, and so surely
(I don't have a mac so I can't look and see) it was including them when
it shouldn't.
(cherry picked from commit 05e2f75ad0)
Previously, external apps such as the Touchbar and AppleScript bindings
could attempt to seek non-seekable content leading to persistent silence
until playback was restarted.
This implements playback control via touch bar and the activity widgets.
It also exposes related playback meta data. It is a manual backport of
the respective code on the master branch and fixes#25744.
[super setDataSource] crashes on macOS 10.11 until 10.13.
The code in question should not be needed (the recieving
properties are weak in new macOS frameworks).
Also whole deallocation of this object is not consistent.
Therefore remove the code in question.
Closesvideolan/vlc#21267
Not doing so could end up opening a file with the default application
associated with it, instead of opening a folder, leading to a potential
remote code execution.
Reported-by: Fabian Bräunlein <fabian@positive.security>
Reported-by: Lukas Euler <lukas@positive.security>
Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
Instead of doing the event parsing in VLCCoreInteraction, do it
in the library. That way the VLC code does not get cluttered with
details how to parse the event and everything is properly dealt with
by the SPMediaKeyTap class.
Do not keep an additional interception state which can get
out of sync with the actual interception state. Just call
CGEventTapEnable with the desired state directly.
Do not create the NSEvent before checking if the event is actually a
NX_SYSDEFINED. It should never happen, but just in case, there is no
point in creating the NSEvent first.
Make it clearer where this message comes from, so it is more obvious
if it ever pops up in the system log, especially now that VLC has a
quite different SPMediaKeyTap compared to the (no longer maintained)
upstream project.