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
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)
...
@@ -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
* X11DRV_create_desktop
*
*
* Create the X11 desktop window for the desktop mode.
* Create the X11 desktop window for the desktop mode.
...
@@ -142,10 +167,6 @@ Window X11DRV_create_desktop( UINT width, UINT height )
...
@@ -142,10 +167,6 @@ Window X11DRV_create_desktop( UINT width, UINT height )
Display
*
display
=
thread_display
();
Display
*
display
=
thread_display
();
wine_tsx11_lock
();
wine_tsx11_lock
();
max_width
=
screen_width
;
max_height
=
screen_height
;
screen_width
=
width
;
screen_height
=
height
;
/* Create window */
/* Create window */
win_attr
.
event_mask
=
ExposureMask
|
KeyPressMask
|
KeyReleaseMask
|
win_attr
.
event_mask
=
ExposureMask
|
KeyPressMask
|
KeyReleaseMask
|
...
@@ -163,17 +184,6 @@ Window X11DRV_create_desktop( UINT width, UINT height )
...
@@ -163,17 +184,6 @@ Window X11DRV_create_desktop( UINT width, UINT height )
CWEventMask
|
CWCursor
|
CWColormap
,
&
win_attr
);
CWEventMask
|
CWCursor
|
CWColormap
,
&
win_attr
);
XFlush
(
display
);
XFlush
(
display
);
wine_tsx11_unlock
();
wine_tsx11_unlock
();
if
(
win
==
None
)
return
None
;
if
(
win
!=
None
)
X11DRV_init_desktop
(
win
,
width
,
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
);
root_window
=
win
;
return
win
;
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 )
...
@@ -858,18 +858,19 @@ static void get_desktop_xwin( Display *display, struct x11drv_win_data *data )
if
(
win
)
if
(
win
)
{
{
unsigned
int
width
,
height
;
/* retrieve the real size of the desktop */
/* retrieve the real size of the desktop */
SERVER_START_REQ
(
get_window_rectangles
)
SERVER_START_REQ
(
get_window_rectangles
)
{
{
req
->
handle
=
data
->
hwnd
;
req
->
handle
=
data
->
hwnd
;
if
(
!
wine_server_call
(
req
))
wine_server_call
(
req
);
{
width
=
reply
->
window
.
right
-
reply
->
window
.
left
;
screen_width
=
reply
->
window
.
right
-
reply
->
window
.
left
;
height
=
reply
->
window
.
bottom
-
reply
->
window
.
top
;
screen_height
=
reply
->
window
.
bottom
-
reply
->
window
.
top
;
}
}
}
SERVER_END_REQ
;
SERVER_END_REQ
;
data
->
whole_window
=
root_window
=
win
;
data
->
whole_window
=
win
;
if
(
win
!=
root_window
)
X11DRV_init_desktop
(
win
,
width
,
height
);
}
}
else
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
...
@@ -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
);
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_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_handle_desktop_resize
(
unsigned
int
width
,
unsigned
int
height
);
extern
void
X11DRV_Settings_AddDepthModes
(
void
);
extern
void
X11DRV_Settings_AddDepthModes
(
void
);
extern
void
X11DRV_Settings_AddOneMode
(
unsigned
int
width
,
unsigned
int
height
,
unsigned
int
bpp
,
unsigned
int
freq
);
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