Skip to content

Commit

Permalink
steamcompmgr: remove some unused includes + some other cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkautarch committed Sep 3, 2024
1 parent df805ad commit f951f0f
Showing 1 changed file with 6 additions and 23 deletions.
29 changes: 6 additions & 23 deletions src/steamcompmgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include <X11/Xcursor/Xcursor.h>
#include <X11/extensions/xfixeswire.h>
#include <X11/extensions/XInput2.h>
#include <cstdint>
#include <memory>
#include <thread>
#include <condition_variable>
Expand All @@ -47,7 +46,6 @@
#include <iostream>
#include <fstream>
#include <string>
#include <queue>
#include <filesystem>
#include <variant>
#include <unordered_set>
Expand All @@ -57,23 +55,16 @@
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <sys/poll.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <sys/types.h>
#if defined(__linux__)
#include <sys/prctl.h>
#elif defined(__DragonFly__) || defined(__FreeBSD__)
#include <sys/procctl.h>
#endif
#include <sys/socket.h>
#include <sys/resource.h>
#include <time.h>
#include <unistd.h>
#include <getopt.h>
#include <spawn.h>
#include <signal.h>
#include <linux/input-event-codes.h>
#include <X11/Xmu/CurUtil.h>
#include "waitable.h"

Expand All @@ -94,9 +85,7 @@
#include "Utils/Process.h"
#include "Utils/Algorithm.h"

#include "wlr_begin.hpp"
#include "wlr/types/wlr_pointer_constraints_v1.h"
#include "wlr_end.hpp"

#if HAVE_AVIF
#include "avif/avif.h"
Expand Down Expand Up @@ -2227,22 +2216,16 @@ paint_all(bool async)

paintID++;
gpuvis_trace_begin_ctx_printf( paintID, "paint_all" );
steamcompmgr_win_t *w;
steamcompmgr_win_t *overlay;
steamcompmgr_win_t *externalOverlay;
steamcompmgr_win_t *notification;
steamcompmgr_win_t *override;
steamcompmgr_win_t *input;

unsigned int currentTime = get_time_in_milliseconds();
bool fadingOut = ( currentTime - fadeOutStartTime < g_FadeOutDuration || g_bPendingFade ) && g_HeldCommits[HELD_COMMIT_FADE] != nullptr;

w = global_focus.focusWindow;
overlay = global_focus.overlayWindow;
externalOverlay = global_focus.externalOverlayWindow;
notification = global_focus.notificationWindow;
override = global_focus.overrideWindow;
input = global_focus.inputFocusWindow;
auto* w = global_focus.focusWindow;
auto* overlay = global_focus.overlayWindow;
auto* externalOverlay = global_focus.externalOverlayWindow;
auto* notification = global_focus.notificationWindow;
auto* override = global_focus.overrideWindow;
auto* input = global_focus.inputFocusWindow;

if (++frameCounter == 300)
{
Expand Down

0 comments on commit f951f0f

Please sign in to comment.