Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
abef9da1
Commit
abef9da1
authored
Feb 25, 2003
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 25, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Forbids selecting (for clipboard) areas larger than the actual
screen-buffer size.
parent
1cd00dae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
40 deletions
+19
-40
user.c
programs/wineconsole/user.c
+19
-40
No files found.
programs/wineconsole/user.c
View file @
abef9da1
...
@@ -612,11 +612,17 @@ static void WCUSER_SetSelection(const struct inner_data* data, HDC hRefDC)
...
@@ -612,11 +612,17 @@ static void WCUSER_SetSelection(const struct inner_data* data, HDC hRefDC)
*
*
*
*
*/
*/
static
void
WCUSER_MoveSelection
(
struct
inner_data
*
data
,
COORD
c1
,
COORD
c2
,
BOOL
final
)
static
void
WCUSER_MoveSelection
(
struct
inner_data
*
data
,
COORD
c1
,
COORD
c2
)
{
{
RECT
r
;
RECT
r
;
HDC
hDC
;
HDC
hDC
;
if
(
c1
.
X
<
0
||
c1
.
X
>=
data
->
curcfg
.
sb_width
||
c2
.
X
<
0
||
c2
.
X
>=
data
->
curcfg
.
sb_width
||
c1
.
Y
<
0
||
c1
.
Y
>=
data
->
curcfg
.
sb_height
||
c2
.
Y
<
0
||
c2
.
Y
>=
data
->
curcfg
.
sb_height
)
return
;
WCUSER_GetSelectionRect
(
data
,
&
r
);
WCUSER_GetSelectionRect
(
data
,
&
r
);
hDC
=
GetDC
(
PRIVATE
(
data
)
->
hWnd
);
hDC
=
GetDC
(
PRIVATE
(
data
)
->
hWnd
);
if
(
hDC
)
if
(
hDC
)
...
@@ -635,11 +641,6 @@ static void WCUSER_MoveSelection(struct inner_data* data, COORD c1, COORD c2, BO
...
@@ -635,11 +641,6 @@ static void WCUSER_MoveSelection(struct inner_data* data, COORD c1, COORD c2, BO
if
(
PRIVATE
(
data
)
->
hWnd
==
GetFocus
()
&&
data
->
curcfg
.
cursor_visible
)
if
(
PRIVATE
(
data
)
->
hWnd
==
GetFocus
()
&&
data
->
curcfg
.
cursor_visible
)
ShowCaret
(
PRIVATE
(
data
)
->
hWnd
);
ShowCaret
(
PRIVATE
(
data
)
->
hWnd
);
}
}
if
(
final
)
{
ReleaseCapture
();
PRIVATE
(
data
)
->
has_selection
=
TRUE
;
}
}
}
/******************************************************************
/******************************************************************
...
@@ -923,37 +924,25 @@ static void WCUSER_HandleSelectionKey(struct inner_data* data, BOOL down,
...
@@ -923,37 +924,25 @@ static void WCUSER_HandleSelectionKey(struct inner_data* data, BOOL down,
c1
=
PRIVATE
(
data
)
->
selectPt1
;
c1
=
PRIVATE
(
data
)
->
selectPt1
;
c2
=
PRIVATE
(
data
)
->
selectPt2
;
c2
=
PRIVATE
(
data
)
->
selectPt2
;
c1
.
X
++
;
c2
.
X
++
;
c1
.
X
++
;
c2
.
X
++
;
if
(
c1
.
X
<
data
->
curcfg
.
sb_width
&&
c2
.
X
<
data
->
curcfg
.
sb_width
)
WCUSER_MoveSelection
(
data
,
c1
,
c2
);
{
WCUSER_MoveSelection
(
data
,
c1
,
c2
,
FALSE
);
}
break
;
break
;
case
VK_LEFT
:
case
VK_LEFT
:
c1
=
PRIVATE
(
data
)
->
selectPt1
;
c1
=
PRIVATE
(
data
)
->
selectPt1
;
c2
=
PRIVATE
(
data
)
->
selectPt2
;
c2
=
PRIVATE
(
data
)
->
selectPt2
;
c1
.
X
--
;
c2
.
X
--
;
c1
.
X
--
;
c2
.
X
--
;
if
(
c1
.
X
>=
0
&&
c2
.
X
>=
0
)
WCUSER_MoveSelection
(
data
,
c1
,
c2
);
{
WCUSER_MoveSelection
(
data
,
c1
,
c2
,
FALSE
);
}
break
;
break
;
case
VK_UP
:
case
VK_UP
:
c1
=
PRIVATE
(
data
)
->
selectPt1
;
c1
=
PRIVATE
(
data
)
->
selectPt1
;
c2
=
PRIVATE
(
data
)
->
selectPt2
;
c2
=
PRIVATE
(
data
)
->
selectPt2
;
c1
.
Y
--
;
c2
.
Y
--
;
c1
.
Y
--
;
c2
.
Y
--
;
if
(
c1
.
Y
>=
0
&&
c2
.
Y
>=
0
)
WCUSER_MoveSelection
(
data
,
c1
,
c2
);
{
WCUSER_MoveSelection
(
data
,
c1
,
c2
,
FALSE
);
}
break
;
break
;
case
VK_DOWN
:
case
VK_DOWN
:
c1
=
PRIVATE
(
data
)
->
selectPt1
;
c1
=
PRIVATE
(
data
)
->
selectPt1
;
c2
=
PRIVATE
(
data
)
->
selectPt2
;
c2
=
PRIVATE
(
data
)
->
selectPt2
;
c1
.
Y
++
;
c2
.
Y
++
;
c1
.
Y
++
;
c2
.
Y
++
;
if
(
c1
.
X
<
data
->
curcfg
.
sb_height
&&
c2
.
X
<
data
->
curcfg
.
sb_height
)
WCUSER_MoveSelection
(
data
,
c1
,
c2
);
{
WCUSER_MoveSelection
(
data
,
c1
,
c2
,
FALSE
);
}
break
;
break
;
}
}
break
;
break
;
...
@@ -964,37 +953,25 @@ static void WCUSER_HandleSelectionKey(struct inner_data* data, BOOL down,
...
@@ -964,37 +953,25 @@ static void WCUSER_HandleSelectionKey(struct inner_data* data, BOOL down,
c1
=
PRIVATE
(
data
)
->
selectPt1
;
c1
=
PRIVATE
(
data
)
->
selectPt1
;
c2
=
PRIVATE
(
data
)
->
selectPt2
;
c2
=
PRIVATE
(
data
)
->
selectPt2
;
c2
.
X
++
;
c2
.
X
++
;
if
(
c2
.
X
<
data
->
curcfg
.
sb_width
)
WCUSER_MoveSelection
(
data
,
c1
,
c2
);
{
WCUSER_MoveSelection
(
data
,
c1
,
c2
,
FALSE
);
}
break
;
break
;
case
VK_LEFT
:
case
VK_LEFT
:
c1
=
PRIVATE
(
data
)
->
selectPt1
;
c1
=
PRIVATE
(
data
)
->
selectPt1
;
c2
=
PRIVATE
(
data
)
->
selectPt2
;
c2
=
PRIVATE
(
data
)
->
selectPt2
;
c2
.
X
--
;
c2
.
X
--
;
if
(
c2
.
X
>=
c1
.
X
)
WCUSER_MoveSelection
(
data
,
c1
,
c2
);
{
WCUSER_MoveSelection
(
data
,
c1
,
c2
,
FALSE
);
}
break
;
break
;
case
VK_UP
:
case
VK_UP
:
c1
=
PRIVATE
(
data
)
->
selectPt1
;
c1
=
PRIVATE
(
data
)
->
selectPt1
;
c2
=
PRIVATE
(
data
)
->
selectPt2
;
c2
=
PRIVATE
(
data
)
->
selectPt2
;
c2
.
Y
--
;
c2
.
Y
--
;
if
(
c2
.
Y
>=
c1
.
Y
)
WCUSER_MoveSelection
(
data
,
c1
,
c2
);
{
WCUSER_MoveSelection
(
data
,
c1
,
c2
,
FALSE
);
}
break
;
break
;
case
VK_DOWN
:
case
VK_DOWN
:
c1
=
PRIVATE
(
data
)
->
selectPt1
;
c1
=
PRIVATE
(
data
)
->
selectPt1
;
c2
=
PRIVATE
(
data
)
->
selectPt2
;
c2
=
PRIVATE
(
data
)
->
selectPt2
;
c2
.
Y
++
;
c2
.
Y
++
;
if
(
c2
.
X
<
data
->
curcfg
.
sb_height
)
WCUSER_MoveSelection
(
data
,
c1
,
c2
);
{
WCUSER_MoveSelection
(
data
,
c1
,
c2
,
FALSE
);
}
break
;
break
;
}
}
break
;
break
;
...
@@ -1137,7 +1114,7 @@ static LRESULT CALLBACK WCUSER_Proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM
...
@@ -1137,7 +1114,7 @@ static LRESULT CALLBACK WCUSER_Proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM
if
(
GetCapture
()
==
PRIVATE
(
data
)
->
hWnd
&&
PRIVATE
(
data
)
->
has_selection
&&
if
(
GetCapture
()
==
PRIVATE
(
data
)
->
hWnd
&&
PRIVATE
(
data
)
->
has_selection
&&
(
wParam
&
MK_LBUTTON
))
(
wParam
&
MK_LBUTTON
))
{
{
WCUSER_MoveSelection
(
data
,
PRIVATE
(
data
)
->
selectPt1
,
WCUSER_GetCell
(
data
,
lParam
)
,
FALSE
);
WCUSER_MoveSelection
(
data
,
PRIVATE
(
data
)
->
selectPt1
,
WCUSER_GetCell
(
data
,
lParam
));
}
}
}
}
else
else
...
@@ -1151,7 +1128,9 @@ static LRESULT CALLBACK WCUSER_Proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM
...
@@ -1151,7 +1128,9 @@ static LRESULT CALLBACK WCUSER_Proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM
if
(
GetCapture
()
==
PRIVATE
(
data
)
->
hWnd
&&
PRIVATE
(
data
)
->
has_selection
&&
if
(
GetCapture
()
==
PRIVATE
(
data
)
->
hWnd
&&
PRIVATE
(
data
)
->
has_selection
&&
(
wParam
&
MK_LBUTTON
))
(
wParam
&
MK_LBUTTON
))
{
{
WCUSER_MoveSelection
(
data
,
PRIVATE
(
data
)
->
selectPt1
,
WCUSER_GetCell
(
data
,
lParam
),
TRUE
);
WCUSER_MoveSelection
(
data
,
PRIVATE
(
data
)
->
selectPt1
,
WCUSER_GetCell
(
data
,
lParam
));
ReleaseCapture
();
PRIVATE
(
data
)
->
has_selection
=
FALSE
;
}
}
}
}
else
else
...
...
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