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
beaf0baf
Commit
beaf0baf
authored
May 12, 2013
by
KO Myung-Hun
Committed by
Rafaël Carré
May 23, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
skins2: fix mouse cursor shape change and mouse cursor position on OS/2
Signed-off-by:
Rafaël Carré
<
funman@videolan.org
>
parent
c8e41f79
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
7 deletions
+21
-7
modules/gui/skins2/os2/os2_factory.cpp
modules/gui/skins2/os2/os2_factory.cpp
+6
-1
modules/gui/skins2/os2/os2_factory.hpp
modules/gui/skins2/os2/os2_factory.hpp
+8
-2
modules/gui/skins2/os2/os2_loop.cpp
modules/gui/skins2/os2/os2_loop.cpp
+7
-4
No files found.
modules/gui/skins2/os2/os2_factory.cpp
View file @
beaf0baf
...
...
@@ -154,7 +154,7 @@ MRESULT EXPENTRY OS2Factory::OS2Proc( HWND hwnd, ULONG msg,
OS2Factory
::
OS2Factory
(
intf_thread_t
*
pIntf
)
:
OSFactory
(
pIntf
),
m_hParentWindow
(
0
),
m_
dirSep
(
"
\\
"
),
m_pfnwpOldFrameProc
(
0
)
m_
pfnwpOldFrameProc
(
0
),
m_dirSep
(
"
\\
"
)
{
// see init()
}
...
...
@@ -204,6 +204,9 @@ bool OS2Factory::init()
SWP_ACTIVATE
|
SWP_ZORDER
|
SWP_MOVE
|
SWP_SIZE
|
SWP_SHOW
);
// Set the mouse pointer to a default arrow
changeCursor
(
kDefaultArrow
);
// Initialize the resource path
char
*
datadir
=
config_GetUserDir
(
VLC_DATA_DIR
);
m_resourcePath
.
push_back
(
(
string
)
datadir
+
"
\\
skins"
);
...
...
@@ -407,6 +410,8 @@ void OS2Factory::changeCursor( CursorType_t type ) const
HPOINTER
hptr
=
WinQuerySysPointer
(
HWND_DESKTOP
,
id
,
FALSE
);
WinSetPointer
(
HWND_DESKTOP
,
hptr
);
m_cursorType
=
type
;
}
...
...
modules/gui/skins2/os2/os2_factory.hpp
View file @
beaf0baf
...
...
@@ -121,8 +121,12 @@ public:
/// Map to find the GenericWindow associated with a OS2Window
map
<
HWND
,
GenericWindow
*>
m_windowMap
;
/// Get the parent window handle
HWND
getParentWindow
()
{
return
m_hParentClientWindow
;
}
/// Get the m_cursorType
CursorType_t
getCursorType
()
const
{
return
m_cursorType
;
}
/// Callback function (Windows Procedure)
static
MRESULT
EXPENTRY
OS2FrameProc
(
HWND
hwnd
,
ULONG
msg
,
MPARAM
mp1
,
MPARAM
Mp2
);
...
...
@@ -136,12 +140,14 @@ private:
HAB
m_hab
;
/// Handle of message queue
HMQ
m_hmq
;
/// Window procedure of the old frame window
PFNWP
m_pfnwpOldFrameProc
;
/// Handle of the parent window
HWND
m_hParentWindow
;
/// Handle of the client window of the parent window
HWND
m_hParentClientWindow
;
/// Window procedure of the old frame window
PFNWP
m_pfnwpOldFrameProc
;
/// Cursor type
mutable
CursorType_t
m_cursorType
;
/// Directory separator
const
string
m_dirSep
;
/// Resource path
...
...
modules/gui/skins2/os2/os2_loop.cpp
View file @
beaf0baf
...
...
@@ -147,14 +147,17 @@ MRESULT EXPENTRY OS2Loop::processEvent( HWND hwnd, ULONG msg,
}
case
WM_MOUSEMOVE
:
{
pFactory
->
changeCursor
(
pFactory
->
getCursorType
());
// Compute the absolute position of the mouse
int
x
=
GET_X_MP
(
mp1
)
+
win
.
getLeft
();
int
y
=
GET_Y_MP
(
mp1
)
+
win
.
getTop
();
POINTL
ptl
;
WinQueryPointerPos
(
HWND_DESKTOP
,
&
ptl
);
int
x
=
ptl
.
x
;
int
y
=
(
pFactory
->
getScreenHeight
()
-
1
)
-
ptl
.
y
;
EvtMotion
evt
(
getIntf
(),
x
,
y
);
win
.
processEvent
(
evt
);
// fall though to WinDefWindowProc()
break
;
return
MRFROMLONG
(
TRUE
);
}
case
WM_MOUSELEAVE
:
{
...
...
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