update code style

This commit is contained in:
vcaesar 2018-02-11 19:03:35 +08:00
parent 35f5016d33
commit 15233120e0
4 changed files with 37 additions and 41 deletions

View File

@ -8,8 +8,7 @@
// #include "../base/xdisplay_c.h" // #include "../base/xdisplay_c.h"
#endif #endif
MMSize getMainDisplaySize(void) MMSize getMainDisplaySize(void){
{
#if defined(IS_MACOSX) #if defined(IS_MACOSX)
CGDirectDisplayID displayID = CGMainDisplayID(); CGDirectDisplayID displayID = CGMainDisplayID();
return MMSizeMake(CGDisplayPixelsWide(displayID), return MMSizeMake(CGDisplayPixelsWide(displayID),
@ -26,8 +25,7 @@ MMSize getMainDisplaySize(void)
#endif #endif
} }
bool pointVisibleOnMainDisplay(MMPoint point) bool pointVisibleOnMainDisplay(MMPoint point){
{
MMSize displaySize = getMainDisplaySize(); MMSize displaySize = getMainDisplaySize();
return point.x < displaySize.width && point.y < displaySize.height; return point.x < displaySize.width && point.y < displaySize.height;
} }

View File

@ -17,8 +17,7 @@
#include <string.h> #include <string.h>
#endif #endif
MMBitmapRef copyMMBitmapFromDisplayInRect(MMRect rect) MMBitmapRef copyMMBitmapFromDisplayInRect(MMRect rect){
{
#if defined(IS_MACOSX) #if defined(IS_MACOSX)
MMBitmapRef bitmap = NULL; MMBitmapRef bitmap = NULL;

View File

@ -609,8 +609,7 @@ void SetActive(const MData win){
if (WM_ACTIVE != None){ if (WM_ACTIVE != None){
// Retrieve the screen number // Retrieve the screen number
XWindowAttributes attr = { 0 }; XWindowAttributes attr = { 0 };
XGetWindowAttributes (rDisplay, XGetWindowAttributes(rDisplay, win.XWin, &attr);
win.XWin, &attr);
int s = XScreenNumberOfScreen(attr.screen); int s = XScreenNumberOfScreen(attr.screen);
// Prepare an event // Prepare an event