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
bec4990c
Commit
bec4990c
authored
Mar 28, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x11drv: Reinitialize the display settings when using a desktop window.
parent
0bcc9921
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
22 deletions
+34
-22
desktop.c
dlls/x11drv/desktop.c
+26
-16
window.c
dlls/x11drv/window.c
+7
-6
x11drv.h
dlls/x11drv/x11drv.h
+1
-0
No files found.
dlls/x11drv/desktop.c
View file @
bec4990c
...
...
@@ -131,6 +131,31 @@ static void X11DRV_desktop_SetCurrentMode(int mode)
}
/***********************************************************************
* X11DRV_init_desktop
*
* Setup the desktop when not using the root window.
*/
void
X11DRV_init_desktop
(
Window
win
,
unsigned
int
width
,
unsigned
int
height
)
{
root_window
=
win
;
max_width
=
screen_width
;
max_height
=
screen_height
;
screen_width
=
width
;
screen_height
=
height
;
/* initialize the available resolutions */
dd_modes
=
X11DRV_Settings_SetHandlers
(
"desktop"
,
X11DRV_desktop_GetCurrentMode
,
X11DRV_desktop_SetCurrentMode
,
NUM_DESKTOP_MODES
+
2
,
1
);
make_modes
();
X11DRV_Settings_AddDepthModes
();
dd_mode_count
=
X11DRV_Settings_GetModeCount
();
X11DRV_Settings_SetDefaultMode
(
0
);
}
/***********************************************************************
* X11DRV_create_desktop
*
* Create the X11 desktop window for the desktop mode.
...
...
@@ -142,10 +167,6 @@ Window X11DRV_create_desktop( UINT width, UINT height )
Display
*
display
=
thread_display
();
wine_tsx11_lock
();
max_width
=
screen_width
;
max_height
=
screen_height
;
screen_width
=
width
;
screen_height
=
height
;
/* Create window */
win_attr
.
event_mask
=
ExposureMask
|
KeyPressMask
|
KeyReleaseMask
|
...
...
@@ -163,17 +184,6 @@ Window X11DRV_create_desktop( UINT width, UINT height )
CWEventMask
|
CWCursor
|
CWColormap
,
&
win_attr
);
XFlush
(
display
);
wine_tsx11_unlock
();
if
(
win
==
None
)
return
None
;
/* initialize the available resolutions */
dd_modes
=
X11DRV_Settings_SetHandlers
(
"desktop"
,
X11DRV_desktop_GetCurrentMode
,
X11DRV_desktop_SetCurrentMode
,
NUM_DESKTOP_MODES
+
2
,
1
);
make_modes
();
X11DRV_Settings_AddDepthModes
();
dd_mode_count
=
X11DRV_Settings_GetModeCount
();
X11DRV_Settings_SetDefaultMode
(
0
);
root_window
=
win
;
if
(
win
!=
None
)
X11DRV_init_desktop
(
win
,
width
,
height
);
return
win
;
}
dlls/x11drv/window.c
View file @
bec4990c
...
...
@@ -858,18 +858,19 @@ static void get_desktop_xwin( Display *display, struct x11drv_win_data *data )
if
(
win
)
{
unsigned
int
width
,
height
;
/* retrieve the real size of the desktop */
SERVER_START_REQ
(
get_window_rectangles
)
{
req
->
handle
=
data
->
hwnd
;
if
(
!
wine_server_call
(
req
))
{
screen_width
=
reply
->
window
.
right
-
reply
->
window
.
left
;
screen_height
=
reply
->
window
.
bottom
-
reply
->
window
.
top
;
}
wine_server_call
(
req
);
width
=
reply
->
window
.
right
-
reply
->
window
.
left
;
height
=
reply
->
window
.
bottom
-
reply
->
window
.
top
;
}
SERVER_END_REQ
;
data
->
whole_window
=
root_window
=
win
;
data
->
whole_window
=
win
;
if
(
win
!=
root_window
)
X11DRV_init_desktop
(
win
,
width
,
height
);
}
else
{
...
...
dlls/x11drv/x11drv.h
View file @
bec4990c
...
...
@@ -684,6 +684,7 @@ extern BOOL X11DRV_set_window_pos( HWND hwnd, HWND insert_after, const RECT *rec
const
RECT
*
rectClient
,
UINT
swp_flags
,
const
RECT
*
validRects
);
extern
void
X11DRV_set_wm_hints
(
Display
*
display
,
struct
x11drv_win_data
*
data
);
extern
void
X11DRV_init_desktop
(
Window
win
,
unsigned
int
width
,
unsigned
int
height
);
extern
void
X11DRV_handle_desktop_resize
(
unsigned
int
width
,
unsigned
int
height
);
extern
void
X11DRV_Settings_AddDepthModes
(
void
);
extern
void
X11DRV_Settings_AddOneMode
(
unsigned
int
width
,
unsigned
int
height
,
unsigned
int
bpp
,
unsigned
int
freq
);
...
...
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