Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
5fe4b004
Commit
5fe4b004
authored
Dec 07, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbus_screensaver: add o.fd.ScreenSaver support (fixes #7824)
parent
dfc527fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
15 deletions
+18
-15
modules/misc/inhibit/dbus.c
modules/misc/inhibit/dbus.c
+18
-15
No files found.
modules/misc/inhibit/dbus.c
View file @
5fe4b004
...
...
@@ -38,7 +38,8 @@
enum
vlc_inhibit_api
{
FREEDESKTOP
,
/* KDE and GNOME <= 2.26 */
FDO_SS
,
/**< KDE >= 4 and GNOME >= 3.6 */
FDO_PM
,
/**< KDE and GNOME <= 2.26 */
GNOME
,
/**< GNOME 2.26..3.4 */
};
...
...
@@ -46,26 +47,30 @@ enum vlc_inhibit_api
static
const
char
dbus_service
[][
32
]
=
{
[
FREEDESKTOP
]
=
"org.freedesktop.PowerManagement"
,
[
GNOME
]
=
"org.gnome.SessionManager"
,
[
FDO_SS
]
=
"org.freedesktop.ScreenSaver"
,
[
FDO_PM
]
=
"org.freedesktop.PowerManagement"
,
[
GNOME
]
=
"org.gnome.SessionManager"
,
};
static
const
char
dbus_path
[][
33
]
=
{
[
FREEDESKTOP
]
=
"/org/freedesktop/PowerManagement"
,
[
GNOME
]
=
"/org/gnome/SessionManager"
,
[
FDO_SS
]
=
"/ScreenSaver"
,
[
FDO_PM
]
=
"/org/freedesktop/PowerManagement"
,
[
GNOME
]
=
"/org/gnome/SessionManager"
,
};
static
const
char
dbus_interface
[][
40
]
=
{
[
FREEDESKTOP
]
=
"org.freedesktop.PowerManagement.Inhibit"
,
[
GNOME
]
=
"org.gnome.SessionManager"
,
[
FDO_SS
]
=
"org.freedesktop.ScreenSaver"
,
[
FDO_PM
]
=
"org.freedesktop.PowerManagement.Inhibit"
,
[
GNOME
]
=
"org.gnome.SessionManager"
,
};
static
const
char
dbus_method_uninhibit
[][
10
]
=
{
[
FREEDESKTOP
]
=
"UnInhibit"
,
[
GNOME
]
=
"Uninhibit"
,
[
FDO_SS
]
=
"UnInhibit"
,
[
FDO_PM
]
=
"UnInhibit"
,
[
GNOME
]
=
"Uninhibit"
,
};
struct
vlc_inhibit_sys
...
...
@@ -129,11 +134,6 @@ static void Inhibit(vlc_inhibit_t *ih, unsigned flags)
switch
(
type
)
{
case
FREEDESKTOP
:
ret
=
dbus_message_append_args
(
msg
,
DBUS_TYPE_STRING
,
&
app
,
DBUS_TYPE_STRING
,
&
reason
,
DBUS_TYPE_INVALID
);
break
;
case
GNOME
:
{
dbus_uint32_t
xid
=
0
;
// FIXME ?
...
...
@@ -147,7 +147,10 @@ static void Inhibit(vlc_inhibit_t *ih, unsigned flags)
break
;
}
default:
assert
(
0
);
ret
=
dbus_message_append_args
(
msg
,
DBUS_TYPE_STRING
,
&
app
,
DBUS_TYPE_STRING
,
&
reason
,
DBUS_TYPE_INVALID
);
break
;
}
if
(
!
ret
...
...
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