mirror of
https://github.com/hyprwm/Hyprland
synced 2025-12-20 12:10:06 +01:00
Compare commits
5 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 967c3c7404 | |||
| eb53dae2a5 | |||
|
|
b45f304c15 | ||
|
|
a85c1f16bf | ||
| 282f423397 |
6 changed files with 60 additions and 15 deletions
37
.github/workflows/release.yaml
vendored
37
.github/workflows/release.yaml
vendored
|
|
@ -8,20 +8,37 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
source-tarball:
|
source-tarball:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
|
||||||
image: archlinux
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository actions
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
sparse-checkout: .github/actions
|
fetch-depth: 0
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
- name: Setup base
|
- name: Populate git info in version.h.in
|
||||||
uses: ./.github/actions/setup_base
|
|
||||||
|
|
||||||
- name: Generate version
|
|
||||||
run: |
|
run: |
|
||||||
cmake -S . -B /tmp/build
|
git fetch --tags --unshallow || true
|
||||||
|
|
||||||
|
COMMIT_HASH=$(git rev-parse HEAD)
|
||||||
|
BRANCH="${GITHUB_REF_NAME:-$(git rev-parse --abbrev-ref HEAD)}"
|
||||||
|
COMMIT_MSG=$(git show -s --format=%s | sed 's/[&/]/\\&/g')
|
||||||
|
COMMIT_DATE=$(git show -s --format=%cd --date=local)
|
||||||
|
GIT_DIRTY=$(git diff-index --quiet HEAD -- && echo "clean" || echo "dirty")
|
||||||
|
GIT_TAG=$(git describe --tags --always || echo "unknown")
|
||||||
|
GIT_COMMITS=$(git rev-list --count HEAD)
|
||||||
|
|
||||||
|
echo "Branch: $BRANCH"
|
||||||
|
echo "Tag: $GIT_TAG"
|
||||||
|
|
||||||
|
sed -i \
|
||||||
|
-e "s|@GIT_COMMIT_HASH@|$COMMIT_HASH|" \
|
||||||
|
-e "s|@GIT_BRANCH@|$BRANCH|" \
|
||||||
|
-e "s|@GIT_COMMIT_MESSAGE@|$COMMIT_MSG|" \
|
||||||
|
-e "s|@GIT_COMMIT_DATE@|$COMMIT_DATE|" \
|
||||||
|
-e "s|@GIT_DIRTY@|$GIT_DIRTY|" \
|
||||||
|
-e "s|@GIT_TAG@|$GIT_TAG|" \
|
||||||
|
-e "s|@GIT_COMMITS@|$GIT_COMMITS|" \
|
||||||
|
src/version.h.in
|
||||||
|
|
||||||
- name: Create tarball with submodules
|
- name: Create tarball with submodules
|
||||||
id: tar
|
id: tar
|
||||||
|
|
|
||||||
2
VERSION
2
VERSION
|
|
@ -1 +1 @@
|
||||||
0.52.0
|
0.52.1
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ version_h = configure_file(
|
||||||
configuration: cfg
|
configuration: cfg
|
||||||
)
|
)
|
||||||
|
|
||||||
install_headers(version_h, subdir: 'src')
|
install_headers(version_h, subdir: 'hyprland/src')
|
||||||
|
|
||||||
xcb_dep = dependency('xcb', required: get_option('xwayland'))
|
xcb_dep = dependency('xcb', required: get_option('xwayland'))
|
||||||
xcb_composite_dep = dependency('xcb-composite', required: get_option('xwayland'))
|
xcb_composite_dep = dependency('xcb-composite', required: get_option('xwayland'))
|
||||||
|
|
|
||||||
|
|
@ -159,7 +159,7 @@ CLayerShellResource::CLayerShellResource(SP<CZwlrLayerSurfaceV1> resource_, SP<C
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_pending.anchor || !(m_pending.anchor & anchor)) {
|
if (anchor && (!m_pending.anchor || !(m_pending.anchor & anchor))) {
|
||||||
r->error(ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_EXCLUSIVE_EDGE, "Exclusive edge doesn't align with anchor");
|
r->error(ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_EXCLUSIVE_EDGE, "Exclusive edge doesn't align with anchor");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,8 @@ COutputManager::COutputManager(SP<CZwlrOutputManagerV1> resource_) : m_resource(
|
||||||
PROTO::outputManagement->m_configurations.pop_back();
|
PROTO::outputManagement->m_configurations.pop_back();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RESOURCE->m_self = RESOURCE;
|
||||||
});
|
});
|
||||||
|
|
||||||
// send all heads at start
|
// send all heads at start
|
||||||
|
|
@ -335,7 +337,7 @@ COutputConfiguration::COutputConfiguration(SP<CZwlrOutputConfigurationV1> resour
|
||||||
const auto SUCCESS = applyTestConfiguration(false);
|
const auto SUCCESS = applyTestConfiguration(false);
|
||||||
|
|
||||||
if (SUCCESS)
|
if (SUCCESS)
|
||||||
m_resource->sendSucceeded();
|
PROTO::outputManagement->m_pendingConfigurationSuccessEvents.emplace_back(m_self);
|
||||||
else
|
else
|
||||||
m_resource->sendFailed();
|
m_resource->sendFailed();
|
||||||
|
|
||||||
|
|
@ -576,7 +578,10 @@ bool COutputConfigurationHead::good() {
|
||||||
}
|
}
|
||||||
|
|
||||||
COutputManagementProtocol::COutputManagementProtocol(const wl_interface* iface, const int& ver, const std::string& name) : IWaylandProtocol(iface, ver, name) {
|
COutputManagementProtocol::COutputManagementProtocol(const wl_interface* iface, const int& ver, const std::string& name) : IWaylandProtocol(iface, ver, name) {
|
||||||
static auto P = g_pHookSystem->hookDynamic("monitorLayoutChanged", [this](void* self, SCallbackInfo& info, std::any param) { this->updateAllOutputs(); });
|
static auto P = g_pHookSystem->hookDynamic("monitorLayoutChanged", [this](void* self, SCallbackInfo& info, std::any param) {
|
||||||
|
updateAllOutputs();
|
||||||
|
sendPendingSuccessEvents();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void COutputManagementProtocol::bindManager(wl_client* client, void* data, uint32_t ver, uint32_t id) {
|
void COutputManagementProtocol::bindManager(wl_client* client, void* data, uint32_t ver, uint32_t id) {
|
||||||
|
|
@ -647,3 +652,19 @@ SP<SWlrManagerSavedOutputState> COutputManagementProtocol::getOutputStateFor(PHL
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void COutputManagementProtocol::sendPendingSuccessEvents() {
|
||||||
|
if (m_pendingConfigurationSuccessEvents.empty())
|
||||||
|
return;
|
||||||
|
|
||||||
|
LOGM(LOG, "Sending {} pending configuration success events", m_pendingConfigurationSuccessEvents.size());
|
||||||
|
|
||||||
|
for (auto const& config : m_pendingConfigurationSuccessEvents) {
|
||||||
|
if (!config)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
config->m_resource->sendSucceeded();
|
||||||
|
}
|
||||||
|
|
||||||
|
m_pendingConfigurationSuccessEvents.clear();
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -141,8 +141,12 @@ class COutputConfiguration {
|
||||||
SP<CZwlrOutputConfigurationV1> m_resource;
|
SP<CZwlrOutputConfigurationV1> m_resource;
|
||||||
std::vector<WP<COutputConfigurationHead>> m_heads;
|
std::vector<WP<COutputConfigurationHead>> m_heads;
|
||||||
WP<COutputManager> m_owner;
|
WP<COutputManager> m_owner;
|
||||||
|
WP<COutputConfiguration> m_self;
|
||||||
|
|
||||||
bool applyTestConfiguration(bool test);
|
bool applyTestConfiguration(bool test);
|
||||||
|
|
||||||
|
friend class COutputManagementProtocol;
|
||||||
|
friend class COutputManager;
|
||||||
};
|
};
|
||||||
|
|
||||||
class COutputManagementProtocol : public IWaylandProtocol {
|
class COutputManagementProtocol : public IWaylandProtocol {
|
||||||
|
|
@ -154,6 +158,8 @@ class COutputManagementProtocol : public IWaylandProtocol {
|
||||||
// doesn't have to return one
|
// doesn't have to return one
|
||||||
SP<SWlrManagerSavedOutputState> getOutputStateFor(PHLMONITOR pMonitor);
|
SP<SWlrManagerSavedOutputState> getOutputStateFor(PHLMONITOR pMonitor);
|
||||||
|
|
||||||
|
void sendPendingSuccessEvents();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void destroyResource(COutputManager* resource);
|
void destroyResource(COutputManager* resource);
|
||||||
void destroyResource(COutputHead* resource);
|
void destroyResource(COutputHead* resource);
|
||||||
|
|
@ -169,6 +175,7 @@ class COutputManagementProtocol : public IWaylandProtocol {
|
||||||
std::vector<SP<COutputMode>> m_modes;
|
std::vector<SP<COutputMode>> m_modes;
|
||||||
std::vector<SP<COutputConfiguration>> m_configurations;
|
std::vector<SP<COutputConfiguration>> m_configurations;
|
||||||
std::vector<SP<COutputConfigurationHead>> m_configurationHeads;
|
std::vector<SP<COutputConfigurationHead>> m_configurationHeads;
|
||||||
|
std::vector<WP<COutputConfiguration>> m_pendingConfigurationSuccessEvents;
|
||||||
|
|
||||||
SP<COutputHead> headFromResource(wl_resource* r);
|
SP<COutputHead> headFromResource(wl_resource* r);
|
||||||
SP<COutputMode> modeFromResource(wl_resource* r);
|
SP<COutputMode> modeFromResource(wl_resource* r);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue