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
614fa0d5
Commit
614fa0d5
authored
Jun 13, 2003
by
Cyril Deguet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* X11 skin windows should have an icon now
parent
3663faf1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
7 deletions
+63
-7
modules/gui/skins/src/skin_common.h
modules/gui/skins/src/skin_common.h
+3
-1
modules/gui/skins/src/skin_main.cpp
modules/gui/skins/src/skin_main.cpp
+38
-5
modules/gui/skins/x11/x11_window.cpp
modules/gui/skins/x11/x11_window.cpp
+22
-1
No files found.
modules/gui/skins/src/skin_common.h
View file @
614fa0d5
...
...
@@ -2,7 +2,7 @@
* skin_common.h: Private Skin interface description
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: skin_common.h,v 1.2
0 2003/06/11 10:42:34 gbazin
Exp $
* $Id: skin_common.h,v 1.2
1 2003/06/13 21:18:53 asmax
Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
...
@@ -87,6 +87,8 @@ struct intf_sys_t
Display
*
display
;
Window
mainWin
;
// Window which receives "broadcast" events
vlc_mutex_t
xlock
;
Pixmap
iconPixmap
;
// vlc icon
Pixmap
iconMask
;
#endif
#ifdef WIN32
...
...
modules/gui/skins/src/skin_main.cpp
View file @
614fa0d5
...
...
@@ -2,7 +2,7 @@
* skin-main.cpp: skins plugin for VLC
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: skin_main.cpp,v 1.3
8 2003/06/11 21:46:57
asmax Exp $
* $Id: skin_main.cpp,v 1.3
9 2003/06/13 21:18:53
asmax Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
...
@@ -57,6 +57,7 @@
#ifdef X11_SKINS
#include <X11/Xlib.h>
#include <Imlib2.h>
#endif
//---------------------------------------------------------------------------
...
...
@@ -129,13 +130,45 @@ static int Open ( vlc_object_t *p_this )
#elif defined X11_SKINS
// Initialize X11
p_intf
->
p_sys
->
display
=
XOpenDisplay
(
NULL
);
Display
*
display
=
XOpenDisplay
(
NULL
);
p_intf
->
p_sys
->
display
=
display
;
vlc_mutex_init
(
p_intf
,
&
p_intf
->
p_sys
->
xlock
);
// Fake window to receive broadcast events
Window
root
=
DefaultRootWindow
(
p_intf
->
p_sys
->
display
);
p_intf
->
p_sys
->
mainWin
=
XCreateSimpleWindow
(
p_intf
->
p_sys
->
display
,
root
,
0
,
0
,
Window
root
=
DefaultRootWindow
(
display
);
p_intf
->
p_sys
->
mainWin
=
XCreateSimpleWindow
(
display
,
root
,
0
,
0
,
1
,
1
,
0
,
0
,
0
);
XStoreName
(
p_intf
->
p_sys
->
display
,
p_intf
->
p_sys
->
mainWin
,
"VLC Media Player"
);
XStoreName
(
display
,
p_intf
->
p_sys
->
mainWin
,
"VLC Media Player"
);
// Load the vlc icon
int
screen
=
DefaultScreen
(
display
);
Screen
*
screenptr
=
DefaultScreenOfDisplay
(
display
);
Visual
*
visual
=
DefaultVisualOfScreen
(
screenptr
);
imlib_context_set_display
(
display
);
imlib_context_set_visual
(
visual
);
imlib_context_set_drawable
(
root
);
imlib_context_set_colormap
(
DefaultColormap
(
display
,
screen
)
);
imlib_context_set_dither
(
1
);
imlib_context_set_blend
(
1
);
Imlib_Image
img
=
imlib_load_image_immediately
(
DATA_PATH
"vlc32x32.png"
);
if
(
img
==
NULL
)
{
// for developers ;)
img
=
imlib_load_image_immediately
(
"./share/vlc32x32.png"
);
}
if
(
img
==
NULL
)
{
msg_Err
(
p_intf
,
"loading vlc icon failed"
);
p_intf
->
p_sys
->
iconPixmap
=
None
;
p_intf
->
p_sys
->
iconMask
=
None
;
}
else
{
imlib_context_set_image
(
img
);
imlib_render_pixmaps_for_whole_image
(
&
p_intf
->
p_sys
->
iconPixmap
,
&
p_intf
->
p_sys
->
iconMask
);
imlib_free_image
();
}
#elif defined WIN32
// Interface thread id used to post broadcast messages
...
...
modules/gui/skins/x11/x11_window.cpp
View file @
614fa0d5
...
...
@@ -2,7 +2,7 @@
* x11_window.cpp: X11 implementation of the Window class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: x11_window.cpp,v 1.2
1 2003/06/09 19:08:33
asmax Exp $
* $Id: x11_window.cpp,v 1.2
2 2003/06/13 21:18:54
asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -95,6 +95,27 @@ X11Window::X11Window( intf_thread_t *p_intf, Window wnd, int x, int y,
XUNLOCK
;
}
// Associate vlc icon to the window
XLOCK
;
XWMHints
*
hints
=
XGetWMHints
(
display
,
Wnd
);
if
(
!
hints
)
{
hints
=
XAllocWMHints
();
}
if
(
hints
->
icon_pixmap
!=
None
)
{
hints
->
icon_pixmap
=
p_intf
->
p_sys
->
iconPixmap
;
hints
->
flags
|=
IconPixmapHint
;
}
if
(
hints
->
icon_mask
!=
None
)
{
hints
->
icon_mask
=
p_intf
->
p_sys
->
iconMask
;
hints
->
flags
|=
IconMaskHint
;
}
XSetWMHints
(
display
,
Wnd
,
hints
);
XFree
(
hints
);
XUNLOCK
;
// Create Tool Tip window
XColor
color
;
color
.
red
=
0xffff
;
...
...
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