mirror of
https://github.com/hyprwm/hyprpaper.git
synced 2024-11-16 22:25:59 +01:00
don't load cursor theme if already loaded
This commit is contained in:
parent
60013ee655
commit
aefd63876d
1 changed files with 20 additions and 20 deletions
|
@ -28,7 +28,6 @@ void CHyprpaper::init() {
|
|||
while (wl_display_dispatch(m_sDisplay) != -1) {
|
||||
tick(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CHyprpaper::tick(bool force) {
|
||||
|
@ -135,6 +134,7 @@ void CHyprpaper::recheckMonitor(SMonitor* pMonitor) {
|
|||
pMonitor->wantsACK = false;
|
||||
zwlr_layer_surface_v1_ack_configure(pMonitor->pCurrentLayerSurface->pLayerSurface, pMonitor->configureSerial);
|
||||
|
||||
if (!pMonitor->pCurrentLayerSurface->pCursorImg) {
|
||||
int XCURSOR_SIZE = 24;
|
||||
if (const auto CURSORSIZENV = getenv("XCURSOR_SIZE"); CURSORSIZENV) {
|
||||
try {
|
||||
|
@ -146,9 +146,9 @@ void CHyprpaper::recheckMonitor(SMonitor* pMonitor) {
|
|||
XCURSOR_SIZE = 24;
|
||||
}
|
||||
}
|
||||
|
||||
pMonitor->pCurrentLayerSurface->pCursorImg = wl_cursor_theme_get_cursor(wl_cursor_theme_load(getenv("XCURSOR_THEME"), XCURSOR_SIZE * pMonitor->scale, m_sSHM), "left_ptr")->images[0];
|
||||
}
|
||||
}
|
||||
|
||||
if (pMonitor->wantsReload) {
|
||||
pMonitor->wantsReload = false;
|
||||
|
|
Loading…
Reference in a new issue