Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
333e49d7
Commit
333e49d7
authored
Apr 21, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved the UsePrimary config parameter to the x11drv section, renamed
as UsePrimarySelection.
parent
7e181f49
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
20 deletions
+11
-20
clipboard.c
dlls/x11drv/clipboard.c
+4
-17
x11drv.h
dlls/x11drv/x11drv.h
+1
-0
x11drv_main.c
dlls/x11drv/x11drv_main.c
+4
-0
config
documentation/samples/config
+2
-3
No files found.
dlls/x11drv/clipboard.c
View file @
333e49d7
...
...
@@ -138,7 +138,6 @@ typedef struct tagWINE_CLIPFORMAT {
static
int
selectionAcquired
=
0
;
/* Contains the current selection masks */
static
Window
selectionWindow
=
None
;
/* The top level X window which owns the selection */
static
BOOL
usePrimary
=
FALSE
;
/* Use primary selection in additon to the clipboard selection */
static
Atom
selectionCacheSrc
=
XA_PRIMARY
;
/* The selection source from which the clipboard cache was filled */
INT
X11DRV_RegisterClipboardFormat
(
LPCWSTR
FormatName
);
...
...
@@ -315,8 +314,6 @@ static UINT ClipDataCount = 0;
*/
static
UINT
wSeqNo
=
0
;
#define IS_OPTION_TRUE(ch) ((ch) == 'y' || (ch) == 'Y' || (ch) == 't' || (ch) == 'T' || (ch) == '1')
/**************************************************************************
* Internal Clipboard implementation methods
**************************************************************************/
...
...
@@ -347,16 +344,6 @@ static Window thread_selection_wnd(void)
void
X11DRV_InitClipboard
(
void
)
{
UINT
i
;
HKEY
hkey
;
if
(
!
RegOpenKeyA
(
HKEY_LOCAL_MACHINE
,
"Software
\\
Wine
\\
Wine
\\
Config
\\
Clipboard"
,
&
hkey
))
{
char
buffer
[
20
];
DWORD
type
,
count
=
sizeof
(
buffer
);
if
(
!
RegQueryValueExA
(
hkey
,
"UsePrimary"
,
0
,
&
type
,
buffer
,
&
count
))
usePrimary
=
IS_OPTION_TRUE
(
buffer
[
0
]
);
RegCloseKey
(
hkey
);
}
/* Register known mapping between window formats and X properties */
for
(
i
=
0
;
i
<
sizeof
(
PropertyFormatMap
)
/
sizeof
(
PropertyFormatMap
[
0
]);
i
++
)
...
...
@@ -1652,11 +1639,11 @@ static int X11DRV_CLIPBOARD_QueryAvailableData(LPCLIPBOARDINFO lpcbinfo)
* Query the selection owner for the TARGETS property
*/
wine_tsx11_lock
();
if
((
use
Primary
&&
XGetSelectionOwner
(
display
,
XA_PRIMARY
))
||
if
((
use
_primary_selection
&&
XGetSelectionOwner
(
display
,
XA_PRIMARY
))
||
XGetSelectionOwner
(
display
,
x11drv_atom
(
CLIPBOARD
)))
{
wine_tsx11_unlock
();
if
(
use
Primary
&&
(
X11DRV_CLIPBOARD_QueryTargets
(
display
,
w
,
XA_PRIMARY
,
x11drv_atom
(
TARGETS
),
&
xe
)))
if
(
use
_primary_selection
&&
(
X11DRV_CLIPBOARD_QueryTargets
(
display
,
w
,
XA_PRIMARY
,
x11drv_atom
(
TARGETS
),
&
xe
)))
selectionCacheSrc
=
XA_PRIMARY
;
else
if
(
X11DRV_CLIPBOARD_QueryTargets
(
display
,
w
,
x11drv_atom
(
CLIPBOARD
),
x11drv_atom
(
TARGETS
),
&
xe
))
selectionCacheSrc
=
x11drv_atom
(
CLIPBOARD
);
...
...
@@ -2163,14 +2150,14 @@ void X11DRV_AcquireClipboard(HWND hWndClipWindow)
wine_tsx11_lock
();
/* Grab PRIMARY selection if not owned */
if
(
use
Primary
&&
!
(
selectionAcquired
&
S_PRIMARY
))
if
(
use
_primary_selection
&&
!
(
selectionAcquired
&
S_PRIMARY
))
XSetSelectionOwner
(
display
,
XA_PRIMARY
,
owner
,
CurrentTime
);
/* Grab CLIPBOARD selection if not owned */
if
(
!
(
selectionAcquired
&
S_CLIPBOARD
))
XSetSelectionOwner
(
display
,
x11drv_atom
(
CLIPBOARD
),
owner
,
CurrentTime
);
if
(
use
Primary
&&
XGetSelectionOwner
(
display
,
XA_PRIMARY
)
==
owner
)
if
(
use
_primary_selection
&&
XGetSelectionOwner
(
display
,
XA_PRIMARY
)
==
owner
)
selectionAcquired
|=
S_PRIMARY
;
if
(
XGetSelectionOwner
(
display
,
x11drv_atom
(
CLIPBOARD
))
==
owner
)
...
...
dlls/x11drv/x11drv.h
View file @
333e49d7
...
...
@@ -536,6 +536,7 @@ extern unsigned int screen_depth;
extern
unsigned
int
text_caps
;
extern
int
use_xkb
;
extern
int
use_take_focus
;
extern
int
use_primary_selection
;
extern
int
managed_mode
;
extern
BYTE
key_state_table
[
256
];
...
...
dlls/x11drv/x11drv_main.c
View file @
333e49d7
...
...
@@ -74,6 +74,7 @@ int usexvidmode = 0;
int
usexrandr
=
1
;
int
use_xkb
=
1
;
int
use_take_focus
=
1
;
int
use_primary_selection
=
0
;
int
managed_mode
=
1
;
int
client_side_with_core
=
1
;
int
client_side_with_render
=
1
;
...
...
@@ -270,6 +271,9 @@ static void setup_options(void)
if
(
!
get_config_key
(
hkey
,
appkey
,
"UseTakeFocus"
,
buffer
,
sizeof
(
buffer
)
))
use_take_focus
=
IS_OPTION_TRUE
(
buffer
[
0
]
);
if
(
!
get_config_key
(
hkey
,
appkey
,
"UsePrimarySelection"
,
buffer
,
sizeof
(
buffer
)
))
use_primary_selection
=
IS_OPTION_TRUE
(
buffer
[
0
]
);
screen_depth
=
0
;
if
(
!
get_config_key
(
hkey
,
appkey
,
"ScreenDepth"
,
buffer
,
sizeof
(
buffer
)
))
screen_depth
=
atoi
(
buffer
);
...
...
documentation/samples/config
View file @
333e49d7
...
...
@@ -66,6 +66,8 @@ WINE REGISTRY Version 2
"UseXRandR" = "Y"
; Use the take focus protocol
"UseTakeFocus" = "Y"
; Use primary selection in addition to clipboard
"UsePrimarySelection" = "N"
; Enable DirectX mouse grab
"DXGrab" = "N"
; Create the desktop window with a double-buffered visual
...
...
@@ -138,9 +140,6 @@ WINE REGISTRY Version 2
;"SnoopExclude" = "RtlEnterCriticalSection;RtlLeaveCriticalSection"
;"SpyExclude" = "WM_SIZE;WM_TIMER;"
[Clipboard]
"UsePrimary" = "0"
; List of all directories directly contain .AFM files
[afmdirs]
"1" = "/usr/share/ghostscript/fonts"
...
...
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