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
56ab55d3
Commit
56ab55d3
authored
Oct 24, 1999
by
Francis Beaudet
Committed by
Alexandre Julliard
Oct 24, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enabled the persistent clipboard server.
parent
7bf36ad3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
25 deletions
+27
-25
clipboard.c
dlls/ole32/clipboard.c
+17
-14
clipboard.c
windows/clipboard.c
+5
-3
user.c
windows/user.c
+0
-5
Makefile.in
windows/x11drv/Makefile.in
+1
-3
clipboard.c
windows/x11drv/clipboard.c
+0
-0
wineclipsrv.c
windows/x11drv/wineclipsrv.c
+0
-0
wine.ini
wine.ini
+4
-0
No files found.
dlls/ole32/clipboard.c
View file @
56ab55d3
...
...
@@ -146,7 +146,7 @@ static void OLEClipbrd_Destroy(OLEClipbrd* ptrToDestroy);
static
HWND
OLEClipbrd_CreateWindow
();
static
void
OLEClipbrd_DestroyWindow
(
HWND
hwnd
);
LRESULT
CALLBACK
OLEClipbrd_WndProc
(
HWND
hWnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
);
static
HRESULT
OLEClipbrd_RenderFormat
(
LPFORMATETC
pFormatetc
);
static
HRESULT
OLEClipbrd_RenderFormat
(
IDataObject
*
pIDataObject
,
LPFORMATETC
pFormatetc
);
static
HGLOBAL
OLEClipbrd_GlobalDupMem
(
HGLOBAL
hGlobalSrc
);
/*
...
...
@@ -473,6 +473,7 @@ HRESULT WINAPI OleFlushClipboard()
FORMATETC
rgelt
;
HRESULT
hr
=
S_OK
;
BOOL
bClipboardOpen
=
FALSE
;
IDataObject
*
pIDataObjectSrc
=
NULL
;
TRACE
(
"()
\n
"
);
...
...
@@ -488,6 +489,13 @@ HRESULT WINAPI OleFlushClipboard()
return
S_OK
;
/*
* Addref and save the source data object we are holding on to temporarily,
* since it will be released when we empty the clipboard.
*/
pIDataObjectSrc
=
theOleClipboard
->
pIDataObjectSrc
;
IDataObject_AddRef
(
pIDataObjectSrc
);
/*
* Open the Windows clipboard
*/
if
(
!
(
bClipboardOpen
=
OpenClipboard
(
theOleClipboard
->
hWndClipboard
))
)
...
...
@@ -503,7 +511,7 @@ HRESULT WINAPI OleFlushClipboard()
* Render all HGLOBAL formats supported by the source into
* the windows clipboard.
*/
if
(
FAILED
(
hr
=
IDataObject_EnumFormatEtc
(
(
IDataObject
*
)
&
(
theOleClipboard
->
lpvtbl1
)
,
if
(
FAILED
(
hr
=
IDataObject_EnumFormatEtc
(
pIDataObjectSrc
,
DATADIR_GET
,
&
penumFormatetc
)
))
{
...
...
@@ -522,7 +530,7 @@ HRESULT WINAPI OleFlushClipboard()
/*
* Render the clipboard data
*/
if
(
FAILED
(
OLEClipbrd_RenderFormat
(
&
rgelt
))
)
if
(
FAILED
(
OLEClipbrd_RenderFormat
(
pIDataObjectSrc
,
&
rgelt
))
)
continue
;
}
}
...
...
@@ -530,13 +538,9 @@ HRESULT WINAPI OleFlushClipboard()
IEnumFORMATETC_Release
(
penumFormatetc
);
/*
* Release the data object we are holding on to
* Release the
source
data object we are holding on to
*/
if
(
theOleClipboard
->
pIDataObjectSrc
)
{
IDataObject_Release
(
theOleClipboard
->
pIDataObjectSrc
);
theOleClipboard
->
pIDataObjectSrc
=
NULL
;
}
IDataObject_Release
(
pIDataObjectSrc
);
CLEANUP:
...
...
@@ -795,7 +799,7 @@ LRESULT CALLBACK OLEClipbrd_WndProc
* Render the clipboard data.
* (We must have a source data object or we wouldn't be in this WndProc)
*/
OLEClipbrd_RenderFormat
(
&
rgelt
);
OLEClipbrd_RenderFormat
(
(
IDataObject
*
)
&
(
theOleClipboard
->
lpvtbl1
),
&
rgelt
);
break
;
}
...
...
@@ -835,7 +839,7 @@ LRESULT CALLBACK OLEClipbrd_WndProc
/*
* Render the clipboard data.
*/
if
(
FAILED
(
OLEClipbrd_RenderFormat
(
&
rgelt
))
)
if
(
FAILED
(
OLEClipbrd_RenderFormat
(
(
IDataObject
*
)
&
(
theOleClipboard
->
lpvtbl1
),
&
rgelt
))
)
continue
;
TRACE
(
"(): WM_RENDERALLFORMATS(cfFormat=%d)
\n
"
,
rgelt
.
cfFormat
);
...
...
@@ -891,14 +895,13 @@ LRESULT CALLBACK OLEClipbrd_WndProc
* source data object.
* Note: This function assumes it is passed an HGLOBAL format to render.
*/
static
HRESULT
OLEClipbrd_RenderFormat
(
LPFORMATETC
pFormatetc
)
static
HRESULT
OLEClipbrd_RenderFormat
(
IDataObject
*
pIDataObject
,
LPFORMATETC
pFormatetc
)
{
STGMEDIUM
medium
;
HGLOBAL
hDup
;
HRESULT
hr
=
S_OK
;
if
(
FAILED
(
hr
=
IDataObject_GetData
((
IDataObject
*
)
&
(
theOleClipboard
->
lpvtbl1
),
pFormatetc
,
&
medium
))
)
if
(
FAILED
(
hr
=
IDataObject_GetData
(
pIDataObject
,
pFormatetc
,
&
medium
))
)
{
WARN
(
"() : IDataObject_GetData failed to render clipboard data! (%lx)
\n
"
,
hr
);
return
hr
;
...
...
windows/clipboard.c
View file @
56ab55d3
...
...
@@ -488,7 +488,7 @@ static LPWINE_CLIPFORMAT CLIPBOARD_RenderText( UINT wFormat )
TRACE
(
"
\t
converting from '%s' to '%s', %i chars
\n
"
,
lpSource
->
Name
,
lpTarget
->
Name
,
size
);
lpTarget
->
hData32
=
GlobalAlloc
(
GMEM_ZEROINIT
,
size
);
lpTarget
->
hData32
=
GlobalAlloc
(
GMEM_ZEROINIT
|
GMEM_MOVEABLE
|
GMEM_DDESHARE
,
size
);
lpstrT
=
(
LPSTR
)
GlobalLock
(
lpTarget
->
hData32
);
if
(
lpstrT
)
...
...
@@ -791,7 +791,8 @@ HANDLE16 WINAPI GetClipboardData16( UINT16 wFormat )
}
/* Convert between 32 -> 16 bit data, if necessary */
if
(
lpRender
->
hData32
&&
!
lpRender
->
hData16
)
if
(
lpRender
->
hData32
&&
!
lpRender
->
hData16
&&
CLIPBOARD_IsMemoryObject
(
wFormat
)
)
{
int
size
;
if
(
lpRender
->
wFormatID
==
CF_METAFILEPICT
)
...
...
@@ -857,7 +858,8 @@ HANDLE WINAPI GetClipboardData( UINT wFormat )
}
/* Convert between 16 -> 32 bit data, if necessary */
if
(
lpRender
->
hData16
&&
!
lpRender
->
hData32
)
if
(
lpRender
->
hData16
&&
!
lpRender
->
hData32
&&
CLIPBOARD_IsMemoryObject
(
wFormat
)
)
{
int
size
;
if
(
lpRender
->
wFormatID
==
CF_METAFILEPICT
)
...
...
windows/user.c
View file @
56ab55d3
...
...
@@ -171,11 +171,6 @@ static void USER_AppExit( HINSTANCE16 hInstance )
* but does nothing);
*/
/* TODO: Start up persistant WINE X clipboard server process which will
* take ownership of the X selection and continue to service selection
* requests from other apps.
*/
/* ModuleUnload() in "Internals" */
hInstance
=
GetExePtr
(
hInstance
);
...
...
windows/x11drv/Makefile.in
View file @
56ab55d3
DEFS
=
@DLLFLAGS@
-D__WINE__
DEFS
=
@DLLFLAGS@
-D__WINE__
-DBINDIR
=
"
\"
$(bindir)
\"
"
TOPSRCDIR
=
@top_srcdir@
TOPOBJDIR
=
../..
SRCDIR
=
@srcdir@
...
...
@@ -23,8 +23,6 @@ all: $(MODULE).o $(PROGRAMS)
wineclipsrv
:
wineclipsrv.c
$(CC)
$(ALLCFLAGS)
-o
wineclipsrv
$(SRCDIR)
/wineclipsrv.c
$(X_LIBS)
$(XLIB)
$(LIBS)
all
:
$(MODULE).o
@MAKE_RULES@
### Dependencies:
windows/x11drv/clipboard.c
View file @
56ab55d3
This diff is collapsed.
Click to expand it.
windows/x11drv/wineclipsrv.c
View file @
56ab55d3
This diff is collapsed.
Click to expand it.
wine.ini
View file @
56ab55d3
...
...
@@ -158,5 +158,9 @@ Startup=
;InitialColumns=80
;TerminalType=nxterm
[Clipboard]
ClearAllSelections
=
0
PersistentSelection
=
1
# </wineconf>
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