mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Fix DEFAULT_URL
This commit is contained in:
parent
345238a352
commit
2ef6ba25dc
7 changed files with 56 additions and 37 deletions
|
@ -270,6 +270,9 @@ void ServoControl::ChangeVisibility(bool visible) {
|
|||
void ServoControl::Stop() {
|
||||
RunOnGLThread([=] { mServo->Stop(); });
|
||||
}
|
||||
void ServoControl::GoHome() {
|
||||
RunOnGLThread([=] { mServo->GoHome(); });
|
||||
}
|
||||
hstring ServoControl::LoadURIOrSearch(hstring input) {
|
||||
// Initial input is valid
|
||||
if (mServo->IsUriValid(input)) {
|
||||
|
@ -306,9 +309,7 @@ void ServoControl::SendMediaSessionAction(int32_t action) {
|
|||
}
|
||||
|
||||
void ServoControl::TryLoadUri(hstring input) {
|
||||
if (!mLooping) {
|
||||
mInitialURL = input;
|
||||
} else {
|
||||
if (mLooping) {
|
||||
RunOnGLThread([=] {
|
||||
if (!mServo->LoadUri(input)) {
|
||||
RunOnUIThread([=] {
|
||||
|
@ -336,8 +337,8 @@ void ServoControl::Loop() {
|
|||
log(L"Entering loop");
|
||||
ServoDelegate *sd = static_cast<ServoDelegate *>(this);
|
||||
EGLNativeWindowType win = GetNativeWindow();
|
||||
mServo = std::make_unique<Servo>(mInitialURL, mArgs, mPanelWidth,
|
||||
mPanelHeight, win, mDPI, *sd);
|
||||
mServo = std::make_unique<Servo>(mArgs, mPanelWidth, mPanelHeight, win,
|
||||
mDPI, *sd);
|
||||
} else {
|
||||
// FIXME: this will fail since create_task didn't pick the thread
|
||||
// where Servo was running initially.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue