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
63fa336d
Commit
63fa336d
authored
May 28, 2003
by
Cyril Deguet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* AT LAST events work in X11 skins !
parent
470e72bd
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
21 deletions
+35
-21
modules/gui/skins/x11/x11_api.cpp
modules/gui/skins/x11/x11_api.cpp
+20
-7
modules/gui/skins/x11/x11_run.cpp
modules/gui/skins/x11/x11_run.cpp
+1
-10
modules/gui/skins/x11/x11_theme.cpp
modules/gui/skins/x11/x11_theme.cpp
+14
-4
No files found.
modules/gui/skins/x11/x11_api.cpp
View file @
63fa336d
...
...
@@ -2,7 +2,7 @@
* x11_api.cpp: Various x11-specific functions
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: x11_api.cpp,v 1.
2 2003/05/19 21:39:34
asmax Exp $
* $Id: x11_api.cpp,v 1.
3 2003/05/28 23:56:51
asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -30,6 +30,7 @@
//--- SKIN ------------------------------------------------------------------
#include <vlc/intf.h>
#include "../src/skin_common.h"
#include "../src/theme.h"
#include "../src/window.h"
#include "../os_window.h"
#include "../os_api.h"
...
...
@@ -57,17 +58,29 @@ void OSAPI_PostMessage( SkinWindow *win, unsigned int message, unsigned int para
event
.
type
=
ClientMessage
;
event
.
xclient
.
display
=
g_pIntf
->
p_sys
->
display
;
if
(
win
==
NULL
)
event
.
xclient
.
window
=
NULL
;
else
event
.
xclient
.
window
=
((
X11Window
*
)
win
)
->
GetHandle
();
event
.
xclient
.
send_event
=
0
;
event
.
xclient
.
message_type
=
NULL
;
event
.
xclient
.
format
=
32
;
event
.
xclient
.
data
.
l
[
0
]
=
message
;
event
.
xclient
.
data
.
l
[
1
]
=
param1
;
event
.
xclient
.
data
.
l
[
2
]
=
param2
;
if
(
win
==
NULL
)
{
// broadcast message
list
<
SkinWindow
*>::
const_iterator
w
;
for
(
w
=
g_pIntf
->
p_sys
->
p_theme
->
WindowList
.
begin
();
w
!=
g_pIntf
->
p_sys
->
p_theme
->
WindowList
.
end
();
w
++
)
{
event
.
xclient
.
window
=
((
X11Window
*
)
*
w
)
->
GetHandle
();
XSendEvent
(
g_pIntf
->
p_sys
->
display
,
event
.
xclient
.
window
,
False
,
0
,
&
event
);
}
}
else
{
event
.
xclient
.
window
=
((
X11Window
*
)
win
)
->
GetHandle
();
XSendEvent
(
g_pIntf
->
p_sys
->
display
,
event
.
xclient
.
window
,
False
,
0
,
&
event
);
}
}
//---------------------------------------------------------------------------
...
...
modules/gui/skins/x11/x11_run.cpp
View file @
63fa336d
...
...
@@ -2,7 +2,7 @@
* x11_run.cpp:
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: x11_run.cpp,v 1.
9 2003/05/26 02:09:27 gbazin
Exp $
* $Id: x11_run.cpp,v 1.
10 2003/05/28 23:56:51 asmax
Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -161,7 +161,6 @@ void ProcessEvent( intf_thread_t *p_intf, VlcProc *proc, XEvent *event )
// Create event to dispatch in windows
// Skin event
if
(
event
->
type
==
ClientMessage
)
{
msg
=
(
(
XClientMessageEvent
*
)
event
)
->
data
.
l
[
0
];
...
...
@@ -213,14 +212,6 @@ void ProcessEvent( intf_thread_t *p_intf, VlcProc *proc, XEvent *event )
return
;
// Exit VLC !
}
}
else
if
(
wnd
==
NULL
)
{
for
(
win
=
p_intf
->
p_sys
->
p_theme
->
WindowList
.
begin
();
win
!=
p_intf
->
p_sys
->
p_theme
->
WindowList
.
end
();
win
++
)
{
(
*
win
)
->
ProcessEvent
(
evt
);
}
}
else
{
// Find window matching with gwnd
...
...
modules/gui/skins/x11/x11_theme.cpp
View file @
63fa336d
...
...
@@ -2,7 +2,7 @@
* x11_theme.cpp: X11 implementation of the Theme class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: x11_theme.cpp,v 1.
4 2003/05/24 21:28:29
asmax Exp $
* $Id: x11_theme.cpp,v 1.
5 2003/05/28 23:56:51
asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -167,8 +167,11 @@ void X11Theme::AddWindow( string name, int x, int y, bool visible,
// Create the window
Window
root
=
DefaultRootWindow
(
display
);
Window
wnd
=
XCreateSimpleWindow
(
display
,
root
,
0
,
0
,
1
,
1
,
0
,
0
,
0
);
XSelectInput
(
display
,
wnd
,
ExposureMask
|
XSetWindowAttributes
attr
;
attr
.
override_redirect
=
True
;
Window
wnd
=
XCreateWindow
(
display
,
root
,
0
,
0
,
1
,
1
,
0
,
0
,
InputOutput
,
CopyFromParent
,
CWOverrideRedirect
,
&
attr
);
XSelectInput
(
display
,
wnd
,
ExposureMask
|
StructureNotifyMask
|
KeyPressMask
|
KeyReleaseMask
|
ButtonPressMask
|
ButtonReleaseMask
|
PointerMotionMask
|
EnterWindowMask
|
LeaveWindowMask
);
...
...
@@ -192,7 +195,14 @@ void X11Theme::AddWindow( string name, int x, int y, bool visible,
// Display the window
XMapRaised
(
display
,
wnd
);
XSync
(
display
,
False
);
XEvent
evt
;
do
{
XNextEvent
(
display
,
&
evt
);
}
while
(
evt
.
type
!=
MapNotify
);
fprintf
(
stderr
,
"
\n
DONE
\n
"
);
WindowList
.
push_back
(
(
SkinWindow
*
)
new
OSWindow
(
p_intf
,
wnd
,
x
,
y
,
visible
,
fadetime
,
alpha
,
movealpha
,
dragdrop
,
name
)
)
;
...
...
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