Skip to content

Commit

Permalink
Display Notification Center cards during video playback
Browse files Browse the repository at this point in the history
We do so by manually drawing the notification cards within the OSD.

Only tested with OpenGL rendering
  • Loading branch information
jyavenard committed Jul 1, 2013
1 parent 845d6f2 commit 3ccfb81
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion mythtv/libs/libmythtv/osd.cpp
Expand Up @@ -15,6 +15,7 @@
#include "mythuibutton.h"
#include "mythuieditbar.h"
#include "mythuistatetype.h"
#include "mythuinotificationcenter.h"

// libmythtv
#include "channelutil.h"
Expand Down Expand Up @@ -649,7 +650,10 @@ bool OSD::DrawDirect(MythPainter* painter, QSize size, bool repaint)
painter->End();
}

return visible;
bool visible2 =
MythUINotificationCenter::GetInstance()->DrawDirect(painter, size, repaint);

return visible || visible2;
}

QRegion OSD::Draw(MythPainter* painter, QPaintDevice *device, QSize size,
Expand Down Expand Up @@ -735,6 +739,14 @@ QRegion OSD::Draw(MythPainter* painter, QPaintDevice *device, QSize size,
if (visible.isEmpty() || (!alignx && !aligny))
return visible;

// display notifications stack
QRegion changed2;
QRegion notification =
MythUINotificationCenter::GetInstance()->Draw(painter, device, size,
changed2, alignx, aligny);
changed = changed.united(changed2);
visible = visible.united(notification);

// assist yuv blending with some friendly alignments
QRegion aligned;
QVector<QRect> rects = visible.rects();
Expand Down

0 comments on commit 3ccfb81

Please sign in to comment.