rocksdanister / lively

Free and open-source software that allows users to set animated desktop wallpapers and screensavers powered by WinUI 3.
https://rocksdanister.com/lively
GNU General Public License v3.0
14.4k stars 1.03k forks source link

When use CefSharp and website as wallpaper, click link cannot call the browser but use just the CefSharp. #1711

Open char-46 opened 1 year ago

char-46 commented 1 year ago

The situation is as described in the title.

Exactly behavior is calling system browser like Edge or Chrome. When use Webview2, things are going to expected.

rocksdanister commented 1 year ago

This is intentional, there are some differences in configuration you can read here: https://github.com/rocksdanister/lively/wiki/Web-Player#cef-chromium-embedded-framework

What is your use case for opening links from wallpaper in system browser?

char-46 commented 1 year ago

use case like these

<a href="https://github.com"><h1>a tag with href attribute</h1></a>
<a href="https://github.com" target="_blank"><h1>a tag with href attribute and target="_blank"</h1></a>
<button onclick="javascript:window.open('https:\/\/github.com')"><h1>javascript:window.open</h1></button>
<button onclick="javascript:window.open('https:\/\/github.com', '_blank')"><h1>javascript:window.open target='_blank'</h1></button>

When use CefSharp, they all just let the screen be a browser but not use system browser to open link.

rocksdanister commented 1 year ago

Attribution hyperlink can be added in wallpaper metadata: image

char-46 commented 1 year ago

the usage scenarios is I create a toolbox html like the browser new tab, than can use like wallpaper change each hour or just click a button to open the tool page. I mean, more interactive in wallpaper but not just show system info on the screen.

--------------raw-------------- 发件人:"Dani John @.>; 发送时间:2023年5月15日(星期一) 下午4:55 收件人:"rocksdanister/lively" @.>; 抄送:"char46 @.>;"Author @.>; 主题:Re: [rocksdanister/lively] When use CefSharp and website as wallpaper, click link cannot call the browser but use just the CefSharp. (Issue #1711)

Attribution hyperlink can be added in wallpaper metadata:

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

rocksdanister commented 1 year ago

The recommended way to do that is by implementing Lively Properties: https://github.com/rocksdanister/lively/wiki/Web-Guide-IV-:-Interaction#lively-properties

image

char-46 commented 1 year ago

Not only set properties for wallpaper, but I also mean more browser apps. Like I using iTab(it developed to browser new tab) as wallpaper (Because it easily to implement much different things like clock, calendar, the wallpaper change each hour, even calculator and so far. Sync my cloud Settings to different browsers for work, home, school, etc.), when I use Edge Webview2 and I click a link on the page, the Edge will be called and open URL which link reference.

rocksdanister commented 1 year ago

I am not sure I fully understand the use case 😅

For WebView2 implementation it is set to open in default browser when <a href="..." target="_blank"> and WebView2 itself if target is not _blank.. is this the behavior you want?

https://github.com/rocksdanister/lively/blob/a7bd488362fe509012d07ea9224a86dd892205a3/src/Lively/Lively.PlayerWebView2/MainWindow.xaml.cs#L119-L126

char-46 commented 1 year ago

I think this is exactly the behavior I was expecting.