wineandroid: Specify the window scale directly in the constructor.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
0f19685917
commit
357c2bb9f9
|
@ -348,16 +348,16 @@ protected class WineWindow extends Object
|
|||
protected WineWindowGroup window_group;
|
||||
protected WineWindowGroup client_group;
|
||||
|
||||
public WineWindow( int w, WineWindow parent )
|
||||
public WineWindow( int w, WineWindow parent, float scale )
|
||||
{
|
||||
Log.i( LOGTAG, String.format( "create hwnd %08x", w ));
|
||||
hwnd = w;
|
||||
owner = 0;
|
||||
style = 0;
|
||||
scale = 1.0f;
|
||||
visible = false;
|
||||
visible_rect = client_rect = new Rect( 0, 0, 0, 0 );
|
||||
this.parent = parent;
|
||||
this.scale = scale;
|
||||
children = new ArrayList<WineWindow>();
|
||||
win_map.put( w, this );
|
||||
if (parent != null) parent.children.add( this );
|
||||
|
@ -744,11 +744,11 @@ protected class TopView extends ViewGroup
|
|||
public TopView( Context context, int hwnd )
|
||||
{
|
||||
super( context );
|
||||
desktop_window = new WineWindow( hwnd, null );
|
||||
desktop_window = new WineWindow( hwnd, null, 1.0f );
|
||||
addView( desktop_window.create_whole_view() );
|
||||
desktop_window.client_group.bringToFront();
|
||||
|
||||
message_window = new WineWindow( WineWindow.HWND_MESSAGE, null );
|
||||
message_window = new WineWindow( WineWindow.HWND_MESSAGE, null, 1.0f );
|
||||
message_window.create_window_groups();
|
||||
}
|
||||
|
||||
|
@ -786,8 +786,7 @@ public void create_window( int hwnd, boolean opengl, int parent, float scale, in
|
|||
WineWindow win = get_window( hwnd );
|
||||
if (win == null)
|
||||
{
|
||||
win = new WineWindow( hwnd, get_window( parent ));
|
||||
win.scale = scale;
|
||||
win = new WineWindow( hwnd, get_window( parent ), scale );
|
||||
win.create_window_groups();
|
||||
if (win.parent == desktop_window) win.create_whole_view();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue