1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:37:35 +00:00

Add a clock widget.

This commit is contained in:
Andreas Kling 2018-10-12 12:18:59 +02:00
parent 6637dec958
commit 73895ce043
12 changed files with 143 additions and 15 deletions

View file

@ -2,6 +2,7 @@
#include "Event.h"
#include "EventLoop.h"
#include "WindowManager.h"
#include "Window.h"
#include <AK/Assertions.h>
Widget::Widget(Widget* parent)
@ -26,6 +27,10 @@ void Widget::event(Event& event)
{
switch (event.type()) {
case Event::Paint:
if (auto* win = window()) {
if (win->isBeingDragged())
return;
}
m_hasPendingPaintEvent = false;
return onPaint(static_cast<PaintEvent&>(event));
case Event::Show: