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
3613b157
Commit
3613b157
authored
Jan 06, 2009
by
Damjan Jovanovic
Committed by
Alexandre Julliard
Jan 07, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Support the startup notification fd.o spec.
parent
d751c2e5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
68 additions
and
1 deletion
+68
-1
window.c
dlls/winex11.drv/window.c
+62
-0
x11drv.h
dlls/winex11.drv/x11drv.h
+2
-0
x11drv_main.c
dlls/winex11.drv/x11drv_main.c
+2
-0
winemenubuilder.c
programs/winemenubuilder/winemenubuilder.c
+1
-1
wine.desktop
tools/wine.desktop
+1
-0
No files found.
dlls/winex11.drv/window.c
View file @
3613b157
...
...
@@ -82,6 +82,66 @@ static const char gl_drawable_prop[] = "__wine_x11_gl_drawable";
static
const
char
pixmap_prop
[]
=
"__wine_x11_pixmap"
;
static
const
char
managed_prop
[]
=
"__wine_x11_managed"
;
/***********************************************************************
* http://standards.freedesktop.org/startup-notification-spec
*/
static
void
remove_startup_notification
(
Display
*
display
,
Window
window
)
{
static
LONG
startup_notification_removed
=
0
;
char
id
[
1024
];
char
message
[
1024
];
int
i
;
int
pos
;
XEvent
xevent
;
const
char
*
src
;
int
srclen
;
if
(
InterlockedCompareExchange
(
&
startup_notification_removed
,
1
,
0
)
!=
0
)
return
;
if
(
GetEnvironmentVariableA
(
"DESKTOP_STARTUP_ID"
,
id
,
sizeof
(
id
))
==
0
)
return
;
SetEnvironmentVariableA
(
"DESKTOP_STARTUP_ID"
,
NULL
);
pos
=
snprintf
(
message
,
sizeof
(
message
),
"remove: ID="
);
message
[
pos
++
]
=
'"'
;
for
(
i
=
0
;
id
[
i
]
&&
pos
<
sizeof
(
message
)
-
2
;
i
++
)
{
if
(
id
[
i
]
==
'"'
||
id
[
i
]
==
'\\'
)
message
[
pos
++
]
=
'\\'
;
message
[
pos
++
]
=
id
[
i
];
}
message
[
pos
++
]
=
'"'
;
message
[
pos
++
]
=
'\0'
;
xevent
.
xclient
.
type
=
ClientMessage
;
xevent
.
xclient
.
message_type
=
x11drv_atom
(
_NET_STARTUP_INFO_BEGIN
);
xevent
.
xclient
.
display
=
display
;
xevent
.
xclient
.
window
=
window
;
xevent
.
xclient
.
format
=
8
;
src
=
message
;
srclen
=
strlen
(
src
)
+
1
;
wine_tsx11_lock
();
while
(
srclen
>
0
)
{
int
msglen
=
srclen
;
if
(
msglen
>
20
)
msglen
=
20
;
memset
(
&
xevent
.
xclient
.
data
.
b
[
0
],
0
,
20
);
memcpy
(
&
xevent
.
xclient
.
data
.
b
[
0
],
src
,
msglen
);
src
+=
msglen
;
srclen
-=
msglen
;
XSendEvent
(
display
,
DefaultRootWindow
(
display
),
False
,
PropertyChangeMask
,
&
xevent
);
xevent
.
xclient
.
message_type
=
x11drv_atom
(
_NET_STARTUP_INFO
);
}
wine_tsx11_unlock
();
}
/***********************************************************************
* is_window_managed
*
...
...
@@ -1099,6 +1159,8 @@ static void map_window( Display *display, struct x11drv_win_data *data, DWORD ne
{
TRACE
(
"win %p/%lx
\n
"
,
data
->
hwnd
,
data
->
whole_window
);
remove_startup_notification
(
display
,
data
->
whole_window
);
wait_for_withdrawn_state
(
display
,
data
,
TRUE
);
if
(
!
data
->
embedded
)
...
...
dlls/winex11.drv/x11drv.h
View file @
3613b157
...
...
@@ -595,6 +595,8 @@ enum x11drv_atoms
XATOM_DndSelection
,
XATOM__ICC_PROFILE
,
XATOM__MOTIF_WM_HINTS
,
XATOM__NET_STARTUP_INFO_BEGIN
,
XATOM__NET_STARTUP_INFO
,
XATOM__NET_SUPPORTED
,
XATOM__NET_SYSTEM_TRAY_OPCODE
,
XATOM__NET_SYSTEM_TRAY_S0
,
...
...
dlls/winex11.drv/x11drv_main.c
View file @
3613b157
...
...
@@ -132,6 +132,8 @@ static const char * const atom_names[NB_XATOMS - FIRST_XATOM] =
"DndSelection"
,
"_ICC_PROFILE"
,
"_MOTIF_WM_HINTS"
,
"_NET_STARTUP_INFO_BEGIN"
,
"_NET_STARTUP_INFO"
,
"_NET_SUPPORTED"
,
"_NET_SYSTEM_TRAY_OPCODE"
,
"_NET_SYSTEM_TRAY_S0"
,
...
...
programs/winemenubuilder/winemenubuilder.c
View file @
3613b157
...
...
@@ -804,7 +804,7 @@ static BOOL write_desktop_entry(const char *location, const char *linkname, cons
fprintf
(
file
,
"Exec=env WINEPREFIX=
\"
%s
\"
wine
\"
%s
\"
%s
\n
"
,
wine_get_config_dir
(),
path
,
args
);
fprintf
(
file
,
"Type=Application
\n
"
);
fprintf
(
file
,
"Startup
WMClass=Win
e
\n
"
);
fprintf
(
file
,
"Startup
Notify=tru
e
\n
"
);
if
(
descr
&&
lstrlenA
(
descr
))
fprintf
(
file
,
"Comment=%s
\n
"
,
descr
);
if
(
workdir
&&
lstrlenA
(
workdir
))
...
...
tools/wine.desktop
View file @
3613b157
...
...
@@ -18,3 +18,4 @@ Name[nn]=Wine Programlaster for Windowsapplikasjoner
Exec=wine start /unix %f
MimeType=application/x-ms-dos-executable;application/x-msdos-program;application/x-msdownload;application/exe;application/x-exe;application/dos-exe;vms/exe;application/x-winexe;application/msdos-windows;application/x-zip-compressed;application/x-executable;application/x-msi;
NoDisplay=true
StartupNotify=true
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