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
5c41156a
Commit
5c41156a
authored
May 26, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
May 27, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Set the fullscreen state of virtual desktops based on size.
parent
7750e36b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
desktop.c
dlls/winex11.drv/desktop.c
+40
-0
No files found.
dlls/winex11.drv/desktop.c
View file @
5c41156a
...
...
@@ -42,6 +42,9 @@ static const unsigned int widths[] = {320, 400, 512, 640, 800, 1024, 1152, 1280
static
const
unsigned
int
heights
[]
=
{
200
,
300
,
384
,
480
,
600
,
768
,
864
,
1024
,
1050
,
1200
};
#define NUM_DESKTOP_MODES (sizeof(widths) / sizeof(widths[0]))
#define _NET_WM_STATE_REMOVE 0
#define _NET_WM_STATE_ADD 1
/* create the mode structures */
static
void
make_modes
(
void
)
{
...
...
@@ -150,6 +153,13 @@ Window CDECL X11DRV_create_desktop( UINT width, UINT height )
win
=
XCreateWindow
(
display
,
DefaultRootWindow
(
display
),
0
,
0
,
width
,
height
,
0
,
screen_depth
,
InputOutput
,
visual
,
CWEventMask
|
CWCursor
|
CWColormap
,
&
win_attr
);
if
(
win
!=
None
&&
width
==
screen_width
&&
height
==
screen_height
)
{
TRACE
(
"setting desktop to fullscreen
\n
"
);
XChangeProperty
(
display
,
win
,
x11drv_atom
(
_NET_WM_STATE
),
XA_ATOM
,
32
,
PropModeReplace
,
(
unsigned
char
*
)
&
x11drv_atom
(
_NET_WM_STATE_FULLSCREEN
),
1
);
}
XFlush
(
display
);
wine_tsx11_unlock
();
if
(
win
!=
None
)
X11DRV_init_desktop
(
win
,
width
,
height
);
...
...
@@ -191,6 +201,35 @@ static BOOL CALLBACK update_windows_on_desktop_resize( HWND hwnd, LPARAM lparam
return
TRUE
;
}
static
void
update_desktop_fullscreen
(
unsigned
int
width
,
unsigned
int
height
)
{
Display
*
display
=
thread_display
();
XEvent
xev
;
wine_tsx11_lock
();
xev
.
xclient
.
type
=
ClientMessage
;
xev
.
xclient
.
window
=
root_window
;
xev
.
xclient
.
message_type
=
x11drv_atom
(
_NET_WM_STATE
);
xev
.
xclient
.
serial
=
0
;
xev
.
xclient
.
display
=
display
;
xev
.
xclient
.
send_event
=
True
;
xev
.
xclient
.
format
=
32
;
if
(
width
==
max_width
&&
height
==
max_height
)
xev
.
xclient
.
data
.
l
[
0
]
=
_NET_WM_STATE_ADD
;
else
xev
.
xclient
.
data
.
l
[
0
]
=
_NET_WM_STATE_REMOVE
;
xev
.
xclient
.
data
.
l
[
1
]
=
x11drv_atom
(
_NET_WM_STATE_FULLSCREEN
);
xev
.
xclient
.
data
.
l
[
2
]
=
0
;
xev
.
xclient
.
data
.
l
[
3
]
=
1
;
TRACE
(
"action=%li
\n
"
,
xev
.
xclient
.
data
.
l
[
0
]);
XSendEvent
(
display
,
DefaultRootWindow
(
display
),
False
,
SubstructureRedirectMask
|
SubstructureNotifyMask
,
&
xev
);
wine_tsx11_unlock
();
}
/***********************************************************************
* X11DRV_resize_desktop
...
...
@@ -212,6 +251,7 @@ void X11DRV_resize_desktop( unsigned int width, unsigned int height )
else
{
TRACE
(
"desktop %p change to (%dx%d)
\n
"
,
hwnd
,
width
,
height
);
update_desktop_fullscreen
(
width
,
height
);
SetWindowPos
(
hwnd
,
0
,
virtual_screen_rect
.
left
,
virtual_screen_rect
.
top
,
virtual_screen_rect
.
right
-
virtual_screen_rect
.
left
,
virtual_screen_rect
.
bottom
-
virtual_screen_rect
.
top
,
...
...
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