Show the reason transparent windows can't be used in shaped sample
IsTransparentBackgroundSupported() may return more information about why exactly are transparent windows not supported, show it if available.
This commit is contained in:
parent
708a408733
commit
67e51e7b6d
1 changed files with 5 additions and 2 deletions
|
|
@ -278,14 +278,17 @@ void MainFrame::OnShowShaped(wxCommandEvent& WXUNUSED(event))
|
|||
|
||||
void MainFrame::OnShowTransparent(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
if (IsTransparentBackgroundSupported())
|
||||
wxString reason;
|
||||
if (IsTransparentBackgroundSupported(&reason))
|
||||
{
|
||||
SeeThroughFrame *seeThroughFrame = new SeeThroughFrame;
|
||||
seeThroughFrame->Create();
|
||||
seeThroughFrame->Show(true);
|
||||
}
|
||||
else
|
||||
wxMessageBox("transparent window requires a composited screen");
|
||||
{
|
||||
wxLogError("%s, can't create transparent window.", reason);
|
||||
}
|
||||
}
|
||||
|
||||
void MainFrame::OnShowEffect(wxCommandEvent& event)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue