Skip to content

Commit c672ac9

Browse files
authored
Make tag.*.tiling.focused_frame a FrameLeaf (herbstluftwm#1087)
The focused frame is always a frame leaf, so the DynChild_ should also have this type. This just improves the type-safety and hlwm-doc.json.
1 parent 9bd7afe commit c672ac9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/frametree.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ shared_ptr<FrameLeaf> FrameTree::findEmptyFrameNearFocusGeometrically(shared_ptr
383383
return closestFrame;
384384
}
385385

386-
Frame* FrameTree::focusedFramePlainPtr()
386+
FrameLeaf* FrameTree::focusedFramePlainPtr()
387387
{
388388
auto shared = focusedFrame();
389389
if (shared) {

src/frametree.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ class FrameTree : public Object {
8282
public: // soon to be come private:
8383
std::shared_ptr<Frame> root_;
8484
Link_<Frame> rootLink_;
85-
DynChild_<Frame> focused_frame_;
85+
DynChild_<FrameLeaf> focused_frame_;
8686
//! replace a node in the frame tree, either modifying old's parent or the root_
8787
void replaceNode(std::shared_ptr<Frame> old, std::shared_ptr<Frame> replacement);
8888
private:
8989
static std::shared_ptr<FrameLeaf> findEmptyFrameNearFocusGeometrically(std::shared_ptr<Frame> subtree);
90-
Frame* focusedFramePlainPtr();
90+
FrameLeaf* focusedFramePlainPtr();
9191
//! cycle the frames within the current tree
9292
void cycle_frame(std::function<size_t(size_t,size_t)> indexAndLenToIndex);
9393
void cycle_frame(int delta);

0 commit comments

Comments
 (0)