Skip to content

Commit

Permalink
only a top-level windows can be in full-screen mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackarain committed May 15, 2012
1 parent 30c0beb commit 7825d91
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions avcore/avplayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ class EXPORT_API avplayer
void volume(double vol);

// 全屏切换.
// 注意: 不支持非顶层窗口全屏操作!
BOOL full_screen(BOOL fullscreen);

// 返回当前播放时间.
Expand Down
4 changes: 4 additions & 0 deletions avcore/player_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,10 @@ BOOL player_impl::full_screen(BOOL fullscreen)
{
HWND hparent = GetParent(m_hwnd);

// 不支持非顶层窗口全屏操作.
if (IsWindow(hparent))
return FALSE;

/* Save the current windows placement/placement to restore
when fullscreen is over */
WINDOWPLACEMENT window_placement;
Expand Down

0 comments on commit 7825d91

Please sign in to comment.